nextgen 0.4.0 → 0.5.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: 07b5db72fd0b2565334a0de9be709d803aac4099527a0f4b559335d8df3061a0
4
- data.tar.gz: 94cf539ccfe794dc70ba2b46102eef081cb1602b923dc58ed4a2dc3ad8cb121a
3
+ metadata.gz: b4d5f0c3ca15b206d8b567446f10d9b20132b34e00d32eacf809ded55d8fa414
4
+ data.tar.gz: 731730e1da7a5c32eecdc4ab6b8d34f22abd87261cf92b13325fc54508d4eb19
5
5
  SHA512:
6
- metadata.gz: dd455a469651f794c75d88263892587016b930941e1baf7e758cddbb85b51ed3f1efdc78c02065a2dcdbcd55686701decb74cda75efba3702abb178f338c4422
7
- data.tar.gz: b347b1918083bc71615fe301e504da5c3c9b4e60283f55b5ff812720ec40fe1cd04f3123fdebbdf2469a0799638d39ea3c37028ca514f0b3d93f2d07748dbb07
6
+ metadata.gz: 51c9da0058d9b3c6b94978e82d78380669ffb650723e2de91290c3d8cb781cf0c2fa21ec814dc8c5ce61a713d480c48769a75ba19b3cafb6bee795ef4f7b079f
7
+ data.tar.gz: 558a1f7705eec3f3ce0fd56f299a128bb32a498b180b7703da8c929815af10490e4cd87bdf4ed3ae5e4ff5149b35fa4d71822167e46ea720a55dcb778beaaaae
data/README.md CHANGED
@@ -7,12 +7,12 @@
7
7
 
8
8
  Nextgen is an **interactive** and flexible alternative to `rails new` that includes opt-in support for modern frontend development with ⚡️**Vite.**
9
9
 
10
- [**About**](#about)
11
- |
12
10
  [**Requirements**](#requirements)
13
11
  |
14
12
  [**Usage**](#usage)
15
13
  |
14
+ [**Examples**](./examples)
15
+ |
16
16
  [**What's included**](#whats-included)<br>
17
17
  [Support](#support)
18
18
  |
@@ -24,21 +24,13 @@ Nextgen is an **interactive** and flexible alternative to `rails new` that inclu
24
24
 
25
25
  ![Screen recording of Nextgen in action](./demo.gif)
26
26
 
27
- ## About
28
-
29
- Nextgen is an interactive and flexible Rails app generator that starts with the official recommendations of `rails new`, and then lets you apply dozens of best-practices, tweaks, documentation, and personal preferences. Opt out of things you don't need (Action Mailbox?), choose your test framework and database, and opt into a curated set of additional gems like FactoryBot and RuboCop configured with reasonable defaults.
30
-
31
- If you need to use React or (gasp!) TypeScript alongside Rails, Nextgen also has you covered with its ability to generate a robust Vite + Rails setup. [Vite](https://vite-ruby.netlify.app) brings excellent frontend tooling that goes well beyond what the default Rails stack can provide.
32
-
33
- Nextgen is maintained by [@mattbrictson](https://github.com/mattbrictson) and is the tool I use to generate all of my personal and professional Rails projects. For more details, check out [what's included](#whats-included) below, or peruse the [examples directory](./examples) of apps generated by Nextgen.
34
-
35
27
  ## Requirements
36
28
 
37
29
  Nextgen generates apps using **Rails 7.1**.
38
30
 
39
31
  - **Ruby 3.0+** is required
40
32
  - **Rubygems 3.4.8+** is required (run `gem update --system` to get it)
41
- - **Node 18+ and Yarn** are required if you choose Vite or other Node-based options
33
+ - **Node 18.12+ and Yarn** are required if you choose Vite or other Node-based options
42
34
  - Additional tools may be required depending on the options you select (e.g. PostgreSQL)
43
35
 
44
36
  Going forward, my goal is that Nextgen will always target the latest stable version of Rails and the next pre-release version. Support for Node LTS and Ruby versions will be dropped as soon as they reach EOL (see [Ruby](https://endoflife.date/ruby) and [Node](https://endoflife.date/nodejs) EOL schedules).
@@ -56,6 +48,10 @@ This will download the latest version of the `nextgen` gem and use it to create
56
48
  > [!NOTE]
57
49
  > If you get an "Unknown command exec" error, fix it by upgrading rubygems: `gem update --system`.
58
50
 
51
+ ## Examples
52
+
53
+ Check out the [examples directory](./examples) to see some Rails apps that were generated with `nextgen create`. RSpec, Vite, and vanilla Rails variations are included.
54
+
59
55
  ## What's included
60
56
 
61
57
  **Nextgen starts with the "omakase" default behavior of `rails new`,** so you get the great things included in Rails 7.1 like a production-ready Dockerfile, your choice of database platform, CSS framework, etc. You can also interactively disable parts of the default stack that you don't need, like JBuilder or Action Mailbox.
@@ -9,7 +9,7 @@ add_yarn_packages(
9
9
  dev: true
10
10
  )
11
11
  add_package_json_scripts(
12
- "lint:js": "eslint 'app/{components,frontend,javascript}/**/*.{js,jsx,ts,tsx}'",
12
+ "lint:js": "eslint 'app/{assets,components,frontend,javascript}/**/*.{cjs,js,jsx,ts,tsx}'",
13
13
  "fix:js": "npm run -- lint:js --fix",
14
14
  lint: "npm-run-all lint:**",
15
15
  fix: "npm-run-all fix:**"
@@ -42,7 +42,7 @@ end
42
42
 
43
43
  say_git "Install autoprefixer"
44
44
  add_yarn_packages "postcss@^8.4.24", "autoprefixer@^10.4.14"
45
- copy_file "postcss.config.js"
45
+ copy_file "postcss.config.cjs"
46
46
 
47
47
  say_git "Disable autoBuild in test environment"
48
48
  gsub_file "config/vite.json", /("test": \{.+?"autoBuild":\s*)true/m, '\1false'
@@ -1,3 +1,3 @@
1
1
  module Nextgen
2
- VERSION = "0.4.0".freeze
2
+ VERSION = "0.5.0".freeze
3
3
  end
@@ -19,6 +19,10 @@ PreCommit:
19
19
  required_executable: npx
20
20
  command: ["npx", "--no-install", "eslint", "-f", "compact"]
21
21
  include:
22
+ - app/assets/**/*.cjs
23
+ - app/components/**/*.cjs
24
+ - app/frontend/**/*.cjs
25
+ - app/javascript/**/*.cjs
22
26
  - app/assets/**/*.js
23
27
  - app/assets/**/*.jsx
24
28
  - app/components/**/*.js
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "private": true,
3
+ "type": "module",
3
4
  "engines": {
4
- "node": ">=18.0.0"
5
+ "node": ">=18.12.0"
5
6
  }
6
7
  }
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.0
4
+ version: 0.5.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: 2023-11-06 00:00:00.000000000 Z
11
+ date: 2023-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -180,7 +180,7 @@ files:
180
180
  - template/lib/templates/rspec/system/system_spec.rb
181
181
  - template/lib/vite_inline_svg_file_loader.rb
182
182
  - template/package.json
183
- - template/postcss.config.js
183
+ - template/postcss.config.cjs
184
184
  - template/spec/support/factory_bot.rb
185
185
  - template/spec/support/mailer.rb
186
186
  - template/spec/support/shoulda.rb
File without changes