nextgen 0.17.0 → 0.18.0
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 +4 -4
- data/README.md +1 -1
- data/lib/nextgen/actions.rb +1 -1
- data/lib/nextgen/generators/base.rb +6 -1
- data/lib/nextgen/generators/vite.rb +1 -2
- data/lib/nextgen/version.rb +1 -1
- data/template/README.md.tt +1 -1
- data/template/bin/dev +4 -0
- data/template/bin/dev-yarn +4 -0
- data/template/bin/setup +3 -3
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 232f4be6f3272b3ea41b9ec5b00dec9839cfa895e191ca4877a15adbc362531a
|
4
|
+
data.tar.gz: 9118e393ffb6addc9d93c1050d673b07c775de544f8d0378347f5c17239b633d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06704c5b229053280d8501695edd1dbc4c611ae727dc4b7979a533227ba9ab26e597f3602f27af5dd6241bede88e0d60dedbaebc81d99da7d705da885c83a1fb
|
7
|
+
data.tar.gz: c7e27d364cbd00690fe2dbec0ec0e5792e3ee22834081c8efcdd0d313145f4d8085160c12067d5672193beeefe1c3d741087469f3d1b93ccef996581fd3cb825
|
data/README.md
CHANGED
@@ -107,7 +107,7 @@ Nextgen can optionally install and configure these Node packages to work nicely
|
|
107
107
|
[Vite](https://vitejs.dev) (pronounced _veet_) is a next generation Node-based frontend build system and hot-reloading dev server. It can completely take the place of the asset pipeline and integrate seamlessly with Rails via the [vite_rails](https://github.com/ElMassimo/vite_ruby) gem. If you opt-in, Nextgen can set you up with Vite and adds a bunch of vite_rails best practices:
|
108
108
|
|
109
109
|
- All frontend sources (CSS, JS, images) are moved to `app/frontend`
|
110
|
-
- A `
|
110
|
+
- A `bin/dev` script is used to start the Rails server and Vite dev server
|
111
111
|
- The [autoprefixer](https://github.com/postcss/autoprefixer) package is installed and activated via PostCSS
|
112
112
|
- A base set of CSS files are added, including [modern_normalize](https://github.com/sindresorhus/modern-normalize)
|
113
113
|
- A Vite-compatible inline SVG helper is added
|
data/lib/nextgen/actions.rb
CHANGED
@@ -15,6 +15,11 @@ copy_file "DEPLOYMENT.md"
|
|
15
15
|
say_git "Create a Procfile"
|
16
16
|
template "Procfile.tt"
|
17
17
|
|
18
|
+
unless File.exist?("bin/dev")
|
19
|
+
say_git "Create bin/dev script"
|
20
|
+
copy_file "bin/dev", mode: :preserve
|
21
|
+
end
|
22
|
+
|
18
23
|
say_git "Set up default rake task"
|
19
24
|
test_task = "test:all" if minitest?
|
20
25
|
append_to_file "Rakefile", <<~RUBY
|
@@ -23,7 +28,7 @@ append_to_file "Rakefile", <<~RUBY
|
|
23
28
|
|
24
29
|
desc "Run all checks"
|
25
30
|
task default: %w[#{test_task}] do
|
26
|
-
|
31
|
+
puts ">>>>>> [OK] All checks passed!"
|
27
32
|
end
|
28
33
|
RUBY
|
29
34
|
|
@@ -96,8 +96,7 @@ say_git "Add a `yarn start` script"
|
|
96
96
|
start = "concurrently -i -k --kill-others-on-fail -p none 'RUBY_DEBUG_OPEN=true bin/rails s' 'bin/vite dev'"
|
97
97
|
add_package_json_script(start:)
|
98
98
|
add_yarn_package "concurrently", dev: true
|
99
|
-
|
100
|
-
gsub_file "bin/setup", %r{bin/rails s(erver)?}, "yarn start"
|
99
|
+
copy_file "bin/dev-yarn", "bin/dev", mode: :preserve, force: true
|
101
100
|
remove_file "Procfile.dev"
|
102
101
|
|
103
102
|
say_git "Add Safari cache workaround in development"
|
data/lib/nextgen/version.rb
CHANGED
data/template/README.md.tt
CHANGED
data/template/bin/dev
ADDED
data/template/bin/setup
CHANGED
@@ -9,7 +9,7 @@ def setup!
|
|
9
9
|
run "bundle install" if bundle_needed?
|
10
10
|
run "overcommit --install" if overcommit_installable?
|
11
11
|
run "bin/rails db:prepare" if database_present?
|
12
|
-
run "yarn install" if yarn_needed?
|
12
|
+
run "yarn install --check-files" if yarn_needed?
|
13
13
|
run "bin/rails tmp:create" if tmp_missing?
|
14
14
|
run "bin/rails restart"
|
15
15
|
|
@@ -20,7 +20,7 @@ def setup!
|
|
20
20
|
end
|
21
21
|
|
22
22
|
say_status :Ready!,
|
23
|
-
"Use #{colorize("bin/
|
23
|
+
"Use #{colorize("bin/dev", :yellow)} to start the app, " \
|
24
24
|
"or #{colorize("bin/rake", :yellow)} to run tests"
|
25
25
|
end
|
26
26
|
|
@@ -49,7 +49,7 @@ def database_present?
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def yarn_needed?
|
52
|
-
File.exist?("yarn.lock")
|
52
|
+
File.exist?("yarn.lock")
|
53
53
|
end
|
54
54
|
|
55
55
|
def tmp_missing?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nextgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -167,6 +167,8 @@ files:
|
|
167
167
|
- template/app/frontend/stylesheets/reset.css
|
168
168
|
- template/app/helpers/inline_svg_helper.rb
|
169
169
|
- template/app/views/home/index.html.erb.tt
|
170
|
+
- template/bin/dev
|
171
|
+
- template/bin/dev-yarn
|
170
172
|
- template/bin/setup
|
171
173
|
- template/config/environments/staging.rb
|
172
174
|
- template/config/initializers/generators.rb
|
@@ -222,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
224
|
- !ruby/object:Gem::Version
|
223
225
|
version: '0'
|
224
226
|
requirements: []
|
225
|
-
rubygems_version: 3.5.
|
227
|
+
rubygems_version: 3.5.16
|
226
228
|
signing_key:
|
227
229
|
specification_version: 4
|
228
230
|
summary: Generate your next Rails app interactively!
|