generate-react-cli 8.1.1 → 8.1.2
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.
- package/package.json +2 -7
- package/readme.md +2 -2
- package/src/commands/generateComponent.js +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generate-react-cli",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.2",
|
|
4
4
|
"description": "A simple React CLI to generate components instantly and more.",
|
|
5
5
|
"repository": "https://github.com/arminbro/generate-react-cli",
|
|
6
6
|
"bugs": "https://github.com/arminbro/generate-react-cli/issues",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@semantic-release/github": "8.0.7",
|
|
57
57
|
"@semantic-release/npm": "9.0.1",
|
|
58
58
|
"@semantic-release/release-notes-generator": "10.0.3",
|
|
59
|
-
"eslint": "8.
|
|
59
|
+
"eslint": "8.30.0",
|
|
60
60
|
"eslint-config-airbnb-base": "15.0.0",
|
|
61
61
|
"eslint-config-prettier": "8.5.0",
|
|
62
62
|
"eslint-plugin-prettier": "4.2.1",
|
|
@@ -71,11 +71,6 @@
|
|
|
71
71
|
"printWidth": 120
|
|
72
72
|
},
|
|
73
73
|
"release": {
|
|
74
|
-
"branches": [
|
|
75
|
-
"alpha",
|
|
76
|
-
"beta",
|
|
77
|
-
"main"
|
|
78
|
-
],
|
|
79
74
|
"plugins": [
|
|
80
75
|
"@semantic-release/commit-analyzer",
|
|
81
76
|
"@semantic-release/release-notes-generator",
|
package/readme.md
CHANGED
|
@@ -411,7 +411,7 @@ GRC uses the DaVinci language model, so you can check out their pricing here: ht
|
|
|
411
411
|
Let's generate our first component using OpenAI:
|
|
412
412
|
|
|
413
413
|
```sh
|
|
414
|
-
npx generate-react-cli c Counter -d "Create a counter component that increments by one when I click on the increment button"
|
|
414
|
+
npx generate-react-cli@alpha c Counter -d "Create a counter component that increments by one when I click on the increment button"
|
|
415
415
|
```
|
|
416
416
|
|
|
417
417
|
GRC should have created a Counter component that looks something like this 🤯:
|
|
@@ -444,7 +444,7 @@ OpenAI will do its best to generate the component following the instructions pro
|
|
|
444
444
|
Okay, let's try another one.
|
|
445
445
|
|
|
446
446
|
```sh
|
|
447
|
-
npx generate-react-cli c GlobalNav -d "Create a navbar component with 1 logo named 'GRC' and 3 links: 'Home', 'About', 'Contact'"
|
|
447
|
+
npx generate-react-cli@alpha c GlobalNav -d "Create a navbar component with 1 logo named 'GRC' and 3 links: 'Home', 'About', 'Contact'"
|
|
448
448
|
```
|
|
449
449
|
|
|
450
450
|
and here's the output in src/components/GlobalNav/GlobalNav.js:
|
|
@@ -24,7 +24,8 @@ export default function initGenerateComponentCommand(args, cliConfigFile, progra
|
|
|
24
24
|
'Describe the component you want GRC to generate (e.g., Create a counter component that increments by one when I click on the increment button).',
|
|
25
25
|
null
|
|
26
26
|
)
|
|
27
|
-
.option('-f, --flat', 'Generate the files in the mentioned path insted of creating new folder for it', false)
|
|
27
|
+
.option('-f, --flat', 'Generate the files in the mentioned path insted of creating new folder for it', false)
|
|
28
|
+
.option('-dr, --dry-run', 'Show what will be generated without writing to disk');
|
|
28
29
|
|
|
29
30
|
// Dynamic component command option defaults.
|
|
30
31
|
|
|
@@ -38,8 +39,6 @@ export default function initGenerateComponentCommand(args, cliConfigFile, progra
|
|
|
38
39
|
);
|
|
39
40
|
});
|
|
40
41
|
|
|
41
|
-
componentCommand.option('--dry-run', 'Show what will be generated without writing to disk');
|
|
42
|
-
|
|
43
42
|
// Component command action.
|
|
44
43
|
|
|
45
44
|
componentCommand.action((componentNames, cmd) =>
|