jekyll-vite 2.0.0.beta.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56c3e622bea10cfa0ed069d465fbcba7ff6ac5bdffb9df9a5fc416a6e6137f12
4
- data.tar.gz: 69d35f0dcf8e46604c709d41c9052225dfc36beddc698e304dd3c4a701ca6aee
3
+ metadata.gz: 7ed9ebef8d09568a45a48b58c5c014e772a982a7e0f40c1f2c0be287534c5ea1
4
+ data.tar.gz: 8ab180969518c5a1c1f4cb8617047ab252f9990ae0734d9fc1e53e472b3b1385
5
5
  SHA512:
6
- metadata.gz: e71487337973282dacb4a736bda265332c10db7b25f0579ffc5dfaf62fffb8c91c3a18378476b4937f583273ac556e9b78a9534859d373725c0cb900c8f3447c
7
- data.tar.gz: 4d995e5292a475307a061ab4da50e697c25d81b7934a3e2cac50118efd371b869ae382c77266306b3b41031cc4ede67b7e8790492cbbeb80f74d3c25fffc1031
6
+ metadata.gz: 2a040da2e2fe8b234a5cd0e07fad55dc69e7e57dabd6f5333204102dd55636ef7ddfd139e36f5bf154dda6400a39807f3b964aa8b40c13413fd1d8dc6c923fba
7
+ data.tar.gz: df3b0e91b365aab5afe58ae8d3c6866a3ee744ba0dd3cec103544291e0cd00bebc61ca5fcb30fc51f8dd4d6cc2db06e599bee1f7aca69510f50b63753d732628
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # [3.0.0](https://github.com/ElMassimo/jekyll-vite/compare/v1.0.0...v3.0.0) (2021-08-16)
2
+
3
+ See ElMassimo/vite_ruby/pull/116 for features and breaking changes.
4
+
1
5
  # [1.0.0](https://github.com/ElMassimo/jekyll-vite/compare/v0.0.3...v1.0.0) (2021-07-22)
2
6
 
3
7
 
data/exe/jekyll-vite ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+ require 'socket'
6
+ require 'vite_ruby'
7
+
8
+ def wait_for_dev_server(timeout_at:)
9
+ while Time.now <= timeout_at
10
+ return if ViteRuby.instance.dev_server_running?
11
+
12
+ sleep 1
13
+ end
14
+ raise "Timeout: vite dev server is not running on #{ ViteRuby.config.host_with_port }"
15
+ end
16
+
17
+ case cmd = ARGV[0]
18
+ when 'wait'
19
+ puts 'Waiting for vite dev server to start'
20
+ wait_for_dev_server(timeout_at: Time.now + (ENV['VITE_TIMEOUT'] || 10).to_i)
21
+ else
22
+ raise ArgumentError, "unknown command #{ cmd.inspect }"
23
+ end
@@ -10,6 +10,10 @@ module Jekyll::Vite::Installation
10
10
  # Override: Setup a typical Jekyll site to use Vite.
11
11
  def setup_app_files
12
12
  cp JEKYLL_TEMPLATES.join('config/jekyll-vite.json'), config.config_path
13
+ append root.join('Procfile.dev'), 'jekyll: bin/jekyll-vite wait && bundle exec jekyll serve --livereload'
14
+ cp JEKYLL_TEMPLATES.join('exe/dev'), root.join('exe/dev')
15
+ `bundle binstub jekyll-vite --path #{ root.join('bin') }`
16
+ `bundle config --delete bin`
13
17
  append root.join('Rakefile'), <<~RAKE
14
18
  require 'jekyll/vite'
15
19
  ViteRuby.install_tasks
@@ -20,13 +24,23 @@ module Jekyll::Vite::Installation
20
24
  def install_sample_files
21
25
  super
22
26
  inject_line_after_last root.join('_config.yml'), 'plugins:', ' - jekyll/vite'
27
+ replace_first_line root.join('_config.yml'), '# exclude:', 'exclude:'
23
28
  inject_line_after_last root.join('_config.yml'), 'exclude:', <<-YML.chomp("\n")
24
29
  - bin
25
30
  - config
26
31
  - vite.config.ts
27
32
  - tmp
33
+ - Procfile.dev
28
34
  YML
29
- inject_line_before root.join('_layouts/default.html'), '</head>', <<-HTML.chomp("\n")
35
+ if root.join('Gemfile').read.include?('minima')
36
+ append root.join('_includes/custom-head.html'), helper_tags
37
+ else
38
+ inject_line_before root.join('_layouts/default.html'), '</head>', helper_tags
39
+ end
40
+ end
41
+
42
+ def helper_tags
43
+ <<-HTML.chomp("\n")
30
44
  {% vite_client_tag %}
31
45
  {% vite_javascript_tag application %}
32
46
  HTML
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Vite
5
- VERSION = '2.0.0.beta.1'
5
+ VERSION = '3.0.2'
6
6
  end
7
7
  end
data/templates/exe/dev ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ if which overmind >/dev/null; then
6
+ overmind start -f Procfile.dev
7
+ else
8
+ echo "Install overmind or modify exe/dev to use a different Procfile launcher."
9
+ echo "https://github.com/DarthSim/overmind"
10
+ fi
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-vite
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Máximo Mussini
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-12 00:00:00.000000000 Z
11
+ date: 2021-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 2.0.0.beta.3
39
+ version: '3.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 2.0.0.beta.3
46
+ version: '3.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: pry-byebug
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -117,13 +117,15 @@ dependencies:
117
117
  description:
118
118
  email:
119
119
  - maximomussini@gmail.com
120
- executables: []
120
+ executables:
121
+ - jekyll-vite
121
122
  extensions: []
122
123
  extra_rdoc_files: []
123
124
  files:
124
125
  - CHANGELOG.md
125
126
  - LICENSE.txt
126
127
  - README.md
128
+ - exe/jekyll-vite
127
129
  - lib/jekyll/vite.rb
128
130
  - lib/jekyll/vite/config.rb
129
131
  - lib/jekyll/vite/generator.rb
@@ -132,12 +134,13 @@ files:
132
134
  - lib/jekyll/vite/tags.rb
133
135
  - lib/jekyll/vite/version.rb
134
136
  - templates/config/jekyll-vite.json
137
+ - templates/exe/dev
135
138
  homepage: https://github.com/ElMassimo/jekyll-vite
136
139
  licenses:
137
140
  - MIT
138
141
  metadata:
139
- source_code_uri: https://github.com/ElMassimo/jekyll-vite/tree/v2.0.0.beta.1
140
- changelog_uri: https://github.com/ElMassimo/jekyll-vite/blob/v2.0.0.beta.1/CHANGELOG.md
142
+ source_code_uri: https://github.com/ElMassimo/jekyll-vite/tree/v3.0.2
143
+ changelog_uri: https://github.com/ElMassimo/jekyll-vite/blob/v3.0.2/CHANGELOG.md
141
144
  post_install_message:
142
145
  rdoc_options: []
143
146
  require_paths:
@@ -149,9 +152,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
152
  version: '2.4'
150
153
  required_rubygems_version: !ruby/object:Gem::Requirement
151
154
  requirements:
152
- - - ">"
155
+ - - ">="
153
156
  - !ruby/object:Gem::Version
154
- version: 1.3.1
157
+ version: '0'
155
158
  requirements: []
156
159
  rubygems_version: 3.1.4
157
160
  signing_key: