next_rails_scaffold 0.2.0 → 0.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 290814ff4b89e5daa4c89b5582625700486c2388b00e75b7cb0fb86bcad793ba
|
4
|
+
data.tar.gz: 7e348321d3d3993b7ba59c1f510c8e617877406d421a0cc14f0649e79a56ce09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81ca951de2a7f4acd112c7e8db80401f422975581b2de334633cff4bc9c0c26b37b5e5036bdb2d415e78339db1b196931bf3c39966c8040653cebb94ee20de1c
|
7
|
+
data.tar.gz: fbd1ac9e2b34d059850ca59e50d6301c3aecf536df62c6f399e1644d0c0553e034cbe104b62ca68795a181a9c22d0c73f31704f662f1688e999519625cd4b5e7
|
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
|
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.18.0")
|
10
|
+
YARN_VERSION = ENV.fetch("YARN_VERSION", "4.5.3")
|
11
|
+
NEXT_VERSION = ENV.fetch("NEXT_VERSION", "15.0.3")
|
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
|
-
|
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
|
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.
|
4
|
+
version: 0.3.0
|
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:
|
11
|
+
date: 2025-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|