nextgen 0.6.0 → 0.8.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: 60ba7f326dc68e00bfac23c9f2e3a9cd6f020044153ebdda66616e7a36986d0d
4
- data.tar.gz: 01acd7693e30d84ec764c61195b459336329a94f91588dfeccf086149c8c259d
3
+ metadata.gz: 1d7d274699408c9756631adaac4969412bce5589a6e5c52aa49eafa66a8a72e1
4
+ data.tar.gz: 8a206e399158c63226f7f3cbc278925458d993a38a9a6b4b2fd96ba50d0cbcf6
5
5
  SHA512:
6
- metadata.gz: 2a57afd381d46af2d4e0c72b64eebc5c3a0b2234258503f12ef3f8c7593b0c243fc04116c5393f6cc79de69f75585aeb61e0f1ad8fedec2696c7d99de54e103e
7
- data.tar.gz: e7c9ebaae680f6d57ecd6cf2c7f565d71cb965f74fbbe13c46011cbf4521df5c5c688713c7d4fb6ed8b8edb3015449464cefda48cc21df365a14e8bd1f228f2d
6
+ metadata.gz: 7aeadac98c5e15621d0991569807746be81f65c6b0f627efcc4eaaf3e21507f6ffc7e25890d208ef6676b1a2fffd36314521fd2b2c56dc284cccff2936afcbcb
7
+ data.tar.gz: '0008d52c832a83813280de39089c6cafa562815efb42b28ea24f7fcca9e1a7d02bf2e3ccf588e2388cc0c8cee785a798e2303b128c89f1c5f368b494460f22ad'
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2023 Matt Brictson
3
+ Copyright (c) 2024 Matt Brictson
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -45,7 +45,7 @@ gem exec nextgen create myapp
45
45
 
46
46
  This will download the latest version of the `nextgen` gem and use it to create an app in the `myapp` directory. You'll be asked to configure the tech stack through several interactive prompts. If you have a `~/.railsrc` file, it will be ignored.
47
47
 
48
- > [!NOTE]
48
+ > [!TIP]
49
49
  > If you get an "Unknown command exec" error, fix it by upgrading rubygems: `gem update --system`.
50
50
 
51
51
  ## Examples
@@ -58,7 +58,7 @@ Check out the [examples directory](./examples) to see some Rails apps that were
58
58
 
59
59
  On top of that foundation, Nextgen offers dozens of useful enhancements to the vanilla Rails experience. You are free to pick and choose which (if any) of these to apply to your new project. Behind the scenes, **each enhancement is applied in a separate git commit,** so that you can later see what was applied and why, and revert the suggestions if necessary.
60
60
 
61
- > [!NOTE]
61
+ > [!TIP]
62
62
  > For the full list of what Nextgen provides, check out [config/generators.yml](https://github.com/mattbrictson/nextgen/tree/main/config/generators.yml). The source code of each generator can be found in [lib/nextgen/generators](https://github.com/mattbrictson/nextgen/tree/main/lib/nextgen/generators).
63
63
 
64
64
  Here are some highlights of what Nextgen brings to the table:
@@ -95,7 +95,7 @@ module Nextgen
95
95
  inject_into_file "README.md", " and lint checks", after: "automated tests"
96
96
  inject_into_file "README.md", <<~MARKDOWN, after: "```\nbin/rake\n```\n"
97
97
 
98
- > [!NOTE]
98
+ > [!TIP]
99
99
  > Rake allows you to run all checks in parallel with the `-m` option. This is much faster, but since the output is interleaved, it may be harder to read.
100
100
 
101
101
  ```
@@ -1,9 +1,9 @@
1
1
  say_git "Install stylelint"
2
2
  add_yarn_packages(
3
- "stylelint@^15",
4
- "stylelint-config-standard@^34",
5
- "stylelint-declaration-strict-value@^1",
6
- "stylelint-prettier@^4",
3
+ "stylelint",
4
+ "stylelint-config-standard",
5
+ "stylelint-declaration-strict-value",
6
+ "stylelint-prettier",
7
7
  "prettier",
8
8
  "npm-run-all",
9
9
  dev: true
@@ -14,7 +14,7 @@ add_package_json_scripts(
14
14
  lint: "npm-run-all lint:**",
15
15
  fix: "npm-run-all fix:**"
16
16
  )
17
- copy_file ".stylelintrc.cjs"
17
+ copy_file ".stylelintrc.js"
18
18
 
19
19
  say_git "Add stylelint to default rake task"
20
20
  copy_file "lib/tasks/stylelint.rake"
@@ -5,6 +5,7 @@ say_git "Move asset pipeline files into app/frontend"
5
5
  remove_file "app/assets/stylesheets/application.css"
6
6
  remove_file "app/javascript/application.js"
7
7
  move "app/javascript", "app/frontend"
8
+ empty_directory "app/frontend"
8
9
  move "app/assets/images", "app/frontend/images"
9
10
  move "app/assets/stylesheets", "app/frontend/stylesheets"
10
11
  remove_dir "app/assets"
@@ -15,13 +16,14 @@ inject_into_class "config/application.rb", "Application", <<-RUBY
15
16
  RUBY
16
17
 
17
18
  say_git "Run the vite installer"
19
+ FileUtils.touch "yarn.lock"
18
20
  bundle_command "exec vite install"
19
21
  gsub_file "app/views/layouts/application.html.erb",
20
22
  /vite_javascript_tag 'application' %>/,
21
23
  'vite_javascript_tag "application", "data-turbo-track": "reload" %>'
22
24
 
23
25
  say_git "Replace vite-plugin-ruby with vite-plugin-rails"
24
- add_yarn_packages "rollup@^3.26.3", "vite-plugin-rails@0.1.0"
26
+ add_yarn_packages "rollup@^4.2.0", "vite-plugin-rails"
25
27
  remove_yarn_package "vite-plugin-ruby"
26
28
  gsub_file "vite.config.ts", "import RubyPlugin from 'vite-plugin-ruby'", 'import ViteRails from "vite-plugin-rails"'
27
29
  gsub_file "vite.config.ts", /^\s*?RubyPlugin\(\)/, <<~TYPESCRIPT.gsub(/^/, " ").rstrip
@@ -8,7 +8,7 @@ module Nextgen
8
8
  YAML.load_file(yaml_path).each do |name, options|
9
9
  options ||= {}
10
10
  requirements = Array(options["requires"])
11
- next unless requirements.all? { |req| rails_opts.public_send("#{req}?") }
11
+ next unless requirements.all? { |req| rails_opts.public_send(:"#{req}?") }
12
12
 
13
13
  g.add(
14
14
  name.to_sym,
@@ -1,3 +1,3 @@
1
1
  module Nextgen
2
- VERSION = "0.6.0".freeze
2
+ VERSION = "0.8.0".freeze
3
3
  end
@@ -1,5 +1,7 @@
1
- module.exports = {
2
- plugins: ["stylelint-declaration-strict-value"],
1
+ import strictValuePlugin from "stylelint-declaration-strict-value";
2
+
3
+ export default {
4
+ plugins: [strictValuePlugin],
3
5
  extends: ["stylelint-config-standard", "stylelint-prettier/recommended"],
4
6
  rules: {
5
7
  "color-hex-length": null,
@@ -30,7 +30,7 @@ Run this script to install necessary dependencies and prepare the Rails app to b
30
30
  bin/setup
31
31
  ```
32
32
 
33
- > [!NOTE]
33
+ > [!TIP]
34
34
  > The `bin/setup` script is idempotent and is designed to be run often. You should run it every time you pull code that introduces new dependencies or makes other significant changes to the project.
35
35
 
36
36
  ### Run the app!
@@ -2,6 +2,6 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "engines": {
5
- "node": ">=18.12.0"
5
+ "node": "^18.12.0 || >= 20.0.0"
6
6
  }
7
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.6.0
4
+ version: 0.8.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-12-18 00:00:00.000000000 Z
11
+ date: 2024-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -152,7 +152,7 @@ files:
152
152
  - template/.overcommit.yml.tt
153
153
  - template/.prettierrc.cjs
154
154
  - template/.rubocop.yml.tt
155
- - template/.stylelintrc.cjs
155
+ - template/.stylelintrc.js
156
156
  - template/DEPLOYMENT.md
157
157
  - template/Procfile.tt
158
158
  - template/README.md.tt
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  requirements: []
222
- rubygems_version: 3.4.22
222
+ rubygems_version: 3.5.3
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: Generate your next Rails app interactively!