next_rails_scaffold 0.2.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 195a1ccf90ee28354555ce504dc25ff17f6515101c508e8b705cbe5fa0c4b2c7
4
- data.tar.gz: a3c0c958f340ae052a235b6c1c61285a4f95fe27ba4ad9431fa6eb75c143586a
3
+ metadata.gz: 7c2225f9eacbc656621975912ce9b1c2929c187557fe469fb341bb09d49e5750
4
+ data.tar.gz: 9315b207c3c4c8e5b64bf810185f99bd6bc6682ffc85a760a7c5149b85f7aaeb
5
5
  SHA512:
6
- metadata.gz: 95b824a162a6ba13a7b0f12138bcffcfd27b5d1b2adcf33906cbda6d1bb8e5f3cd87ff2ca9ddeea6ee65b8c31f239eb19b940df4c81dd36845551c0e07ad8b98
7
- data.tar.gz: d5ab3b8a2f828d610a14438a3dc5f291a1fb034cd929903d5d2f3771df067017937746e3823473bab1735d4057a3fc45067d16159f339de6346b6380a2e7db9d
6
+ metadata.gz: be60c9ec365f1899d090820cffa5704003a1d07c6e0d6b1225d41081428b9e4ba7fe9fd1f2ea4b6ea9d1bb9c7af7556bcd089c2b99eaae093a341d7e548dd29f
7
+ data.tar.gz: f93520c64dfacf3a926400672469d1ab53d60cd2fe8d70b8d0bda80b7bb657c927e014fce731813e90b4554df08d5e32a16f3ae4dbd832882ebe661f393e3088
data/README.md CHANGED
@@ -55,7 +55,7 @@ Example:
55
55
  bin/rails generate next_rails_scaffold:install
56
56
 
57
57
  # Generate the RESfull API endpoints and Next.js app with respective components and pages.
58
- bin/rails generate scaffold Post tile:string body:text
58
+ bin/rails generate scaffold Post title:string body:text
59
59
  ```
60
60
 
61
61
  This will create:
@@ -6,9 +6,9 @@ module Rails
6
6
 
7
7
  source_root File.expand_path("templates", __dir__)
8
8
 
9
- NODE_REQUIRED_VERSION = ">= 18.18.0"
10
- YARN_VERSION = "4.5.3"
11
- NEXT_VERSION = "15.0.3"
9
+ NODE_REQUIRED_VERSION = ENV.fetch("NODE_REQUIRED_VERSION", ">= 18.20.6")
10
+ YARN_VERSION = ENV.fetch("YARN_VERSION", "1.22.22")
11
+ NEXT_VERSION = ENV.fetch("NEXT_VERSION", "15.1.6")
12
12
 
13
13
  argument :attributes, type: :array, default: [], banner: "field:type field:type"
14
14
 
@@ -50,7 +50,9 @@ module Rails
50
50
  create_next_app!
51
51
  install_hygen!
52
52
 
53
- run("npx hygen scaffold javascript #{name} #{mapped_attributes.join(" ")}")
53
+ language = File.exist?("tsconfig.json") ? "typescript" : "javascript"
54
+
55
+ run("npx hygen scaffold #{language} #{name} #{mapped_attributes.join(" ")}")
54
56
  run("yarn build")
55
57
  end
56
58
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NextRailsScaffold
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: next_rails_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raphael Araújo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-27 00:00:00.000000000 Z
11
+ date: 2025-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails