nextgen 0.17.1 → 0.18.0

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: 38db6779e6011d4a674dbfcb2337f6d54778694a5c661163e79f9a22b279bb32
4
- data.tar.gz: f4b8be15108161721b9ad1d2b48ede9715ef5a73941fde89a8a02bd6c1a79676
3
+ metadata.gz: 232f4be6f3272b3ea41b9ec5b00dec9839cfa895e191ca4877a15adbc362531a
4
+ data.tar.gz: 9118e393ffb6addc9d93c1050d673b07c775de544f8d0378347f5c17239b633d
5
5
  SHA512:
6
- metadata.gz: e986c9049350c61178690483c17b6a1ad1c905a7ed513ba101d1eb6d1718d22fddf67a82e2c436afd9f6b6370460030eaf12621b701dfffa3cee53216a66d4fa
7
- data.tar.gz: b2a46622619b7bc69b04decccba76197f98624ebaa636d570e21d8db9983ad8e7d075cc025e996708fe1c02dac5b35fc579c1b282f87b1090cd9bb2f3627c671
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 `yarn start` script is used to start the Rails server and Vite dev server
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
@@ -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
@@ -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
- gsub_file "README.md", %r{bin/rails s(erver)?}, "yarn start"
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"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nextgen
4
- VERSION = "0.17.1"
4
+ VERSION = "0.18.0"
5
5
  end
@@ -38,7 +38,7 @@ bin/setup
38
38
  Start the Rails server with this command:
39
39
 
40
40
  ```
41
- bin/rails s
41
+ bin/dev
42
42
  ```
43
43
 
44
44
  The app will be located at <http://localhost:3000/>.
data/template/bin/dev ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ exec "./bin/rails", "server", *ARGV
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ exec "yarn", "start", *ARGV
data/template/bin/setup CHANGED
@@ -20,7 +20,7 @@ def setup!
20
20
  end
21
21
 
22
22
  say_status :Ready!,
23
- "Use #{colorize("bin/rails s", :yellow)} to start the app, " \
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
 
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.17.1
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-07-25 00:00:00.000000000 Z
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.11
227
+ rubygems_version: 3.5.16
226
228
  signing_key:
227
229
  specification_version: 4
228
230
  summary: Generate your next Rails app interactively!