trmnl_preview 0.5.7 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f3284ba2c2879994af5aabd394416875771b008510fffb27798551e3a9c85ad
4
- data.tar.gz: 9f664bc7134763f88dab40b5075aa77bf08892bf68b1f1e29771cc47a3f2b95e
3
+ metadata.gz: 666e3d36b7605ff52258d520a44671f690064e2afaae9f7d9f700f807821c0bc
4
+ data.tar.gz: 44939915d3f57c12d9662dd5501ed3c03960fece9fb89576af1f72d26a31a21e
5
5
  SHA512:
6
- metadata.gz: 9e5685d0a9359f229087bbc1d59e2969e87cb54251eb90ca73787f4731ce6b085c829428721838543596f3cfd1c1d7958b363fcd8f3b2d5d0f981490c14bfdd3
7
- data.tar.gz: 372e8d359ee7ef461ccffb12f8dd6d8a328e0c4d32178e62d4e3e358f38f3ac40b971d25ac63c1cf3b97388b3f483b0c814568f40c4c8d30169e6dfdc9a95811
6
+ metadata.gz: a8fa140c11d4c883814602007492523780c652e57fa4e21130db465ecd495c19ccc24166d9b06d03a94ea17d67e21299d5083aa308302f4bd4abedefb98f8471
7
+ data.tar.gz: 48080478a80731230261db70534d79996f5acca48e64a1c9132dd1ad399547a166ec20cdf0366deb188acb488eae78a2473b165f5a2a71ec79281cfa666fb286
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.8
4
+
5
+ - Improve Docker commands in `bin/trmnlp` (@jrand0m, @jbarreiros)
6
+
3
7
  ## 0.5.7
4
8
 
5
9
  - Use the `trmnl-liquid` gem so tags and filters stay up-to-date with the core offering
data/README.md CHANGED
@@ -83,7 +83,7 @@ trmnlp serve
83
83
  ```sh
84
84
  docker run \
85
85
  --publish 4567:4567 \
86
- --volume ".:/plugin" \
86
+ --volume "$(pwd):/plugin" \
87
87
  trmnl/trmnlp serve
88
88
  ```
89
89
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TRMNLP
4
- VERSION = "0.5.7".freeze
4
+ VERSION = "0.5.9".freeze
5
5
  end
@@ -10,12 +10,25 @@ then
10
10
  exit
11
11
  fi
12
12
 
13
+ # Determine XDG config directory on host OS
14
+ if [ -n "$XDG_CONFIG_HOME" ]; then
15
+ CONFIG_DIR="$XDG_CONFIG_HOME/trmnlp"
16
+ else
17
+ CONFIG_DIR="$HOME/.config/trmnlp"
18
+ fi
19
+
20
+ if [ ! -d "$CONFIG_DIR" ]; then
21
+ mkdir -p "$CONFIG_DIR"
22
+ fi
23
+
13
24
  if command -v docker &> /dev/null
14
25
  then
15
26
  docker run \
27
+ -it \
16
28
  --rm \
17
29
  --publish 4567:4567 \
18
30
  --volume "$(pwd):/plugin" \
31
+ --volume "$CONFIG_DIR:/root/.config/trmnlp" \
19
32
  trmnl/trmnlp "$@"
20
33
  exit
21
34
  fi
@@ -59,6 +59,7 @@ Gem::Specification.new do |spec|
59
59
  spec.add_dependency "thor", "~> 1.3"
60
60
  spec.add_dependency "oj", "~> 3.16.9"
61
61
  spec.add_dependency "tzinfo-data", "~> 1.2025"
62
+ spec.add_dependency "pathname", "~> 0.4"
62
63
 
63
64
  # For more information and examples about making a new gem, check out our
64
65
  # guide at: https://bundler.io/guides/creating_gem.html
data/web/public/index.js CHANGED
@@ -24,7 +24,7 @@ trmnlp.connectLiveRender = function () {
24
24
 
25
25
  trmnlp.setFrameColor = function () {
26
26
  const value = trmnlp.caseSelect.value;
27
- document.querySelector("trmnl-frame").setAttribute("color", value);
27
+ trmnlp.frame.setAttribute("color", value);
28
28
  localStorage.setItem("trmnlp-case", value);
29
29
  };
30
30
 
@@ -36,7 +36,7 @@ trmnlp.setPreviewFormat = function () {
36
36
  };
37
37
 
38
38
  trmnlp.setFrameSrc = function (src) {
39
- document.querySelector(".spinner").style.display = "inline-block";
39
+ trmnlp.spinner.style.display = "inline-block";
40
40
  trmnlp.frame.setSrc(src);
41
41
  };
42
42
 
@@ -46,6 +46,7 @@ document.addEventListener("DOMContentLoaded", function () {
46
46
  trmnlp.caseSelect = document.querySelector(".select-case");
47
47
  trmnlp.formatSelect = document.querySelector(".select-format");
48
48
  trmnlp.userData = document.getElementById("user-data");
49
+ trmnlp.spinner = document.querySelector(".spinner");
49
50
  trmnlp.isLiveReloadEnabled =
50
51
  document.querySelector("meta[name='live-reload']").content === "true";
51
52
 
@@ -67,7 +68,7 @@ document.addEventListener("DOMContentLoaded", function () {
67
68
  });
68
69
 
69
70
  trmnlp.frame._iframe.addEventListener("load", () => {
70
- document.querySelector(".spinner").style.display = "none";
71
+ trmnlp.spinner.style.display = "none";
71
72
 
72
73
  // On page load, trmnl-frame loads "about:blank", so wait for that to load
73
74
  // before updating the src to the preview.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trmnl_preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rockwell Schrock
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-08-19 00:00:00.000000000 Z
10
+ date: 2025-11-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: sinatra
@@ -233,6 +233,20 @@ dependencies:
233
233
  - - "~>"
234
234
  - !ruby/object:Gem::Version
235
235
  version: '1.2025'
236
+ - !ruby/object:Gem::Dependency
237
+ name: pathname
238
+ requirement: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - "~>"
241
+ - !ruby/object:Gem::Version
242
+ version: '0.4'
243
+ type: :runtime
244
+ prerelease: false
245
+ version_requirements: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - "~>"
248
+ - !ruby/object:Gem::Version
249
+ version: '0.4'
236
250
  description: Automatically rebuild and preview TRNML plugins in multiple views
237
251
  email:
238
252
  - rockwell@schrock.me