create-liferay-react-cx 1.0.1 → 1.0.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/LICENSE +2 -2
- package/README.md +3 -24
- package/bin/index.js +10 -10
- package/package.json +11 -8
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2026 Laxit Khanpara
|
|
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
|
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
- [All Ways to Use This CLI](#all-ways-to-use-this-cli)
|
|
18
18
|
- [Method 1 — npm create (Recommended)](#method-1--npm-create-recommended)
|
|
19
19
|
- [Method 2 — npx (No Install)](#method-2--npx-no-install)
|
|
20
|
-
- [Method 3 — Global Install](#method-3--global-install)
|
|
21
20
|
- [Options & Flags](#options--flags)
|
|
22
21
|
- [Interactive Mode](#interactive-mode)
|
|
23
22
|
- [Generated Project Structure](#generated-project-structure)
|
|
@@ -53,7 +52,7 @@ Before you start, make sure you have:
|
|
|
53
52
|
## Quick Start
|
|
54
53
|
|
|
55
54
|
```bash
|
|
56
|
-
|
|
55
|
+
npx create-liferay-react-cx my-widget
|
|
57
56
|
cd my-widget
|
|
58
57
|
../../gradlew deploy
|
|
59
58
|
```
|
|
@@ -107,26 +106,6 @@ npx create-liferay-react-cx
|
|
|
107
106
|
|
|
108
107
|
---
|
|
109
108
|
|
|
110
|
-
### Method 3 — Global Install
|
|
111
|
-
|
|
112
|
-
Install once, use anywhere. After a global install, you can use the short alias `liferay-react-cx` from any directory.
|
|
113
|
-
|
|
114
|
-
**Step 1 — Install globally:**
|
|
115
|
-
```bash
|
|
116
|
-
npm install -g create-liferay-react-cx
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
**Step 2 — Use it:**
|
|
120
|
-
```bash
|
|
121
|
-
liferay-react-cx my-widget
|
|
122
|
-
liferay-react-cx --name my-widget --react-version 18.2.0
|
|
123
|
-
liferay-react-cx --help
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
> **Tip:** To update a globally installed version later, run `npm update -g create-liferay-react-cx`.
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
109
|
## Options & Flags
|
|
131
110
|
|
|
132
111
|
| Flag | Short | Description | Default |
|
|
@@ -145,9 +124,9 @@ liferay-react-cx --help
|
|
|
145
124
|
Run the CLI with no arguments to enter the interactive wizard:
|
|
146
125
|
|
|
147
126
|
```bash
|
|
148
|
-
npm create liferay-react-cx
|
|
149
|
-
# or
|
|
150
127
|
npx create-liferay-react-cx
|
|
128
|
+
# or
|
|
129
|
+
npm create liferay-react-cx
|
|
151
130
|
```
|
|
152
131
|
|
|
153
132
|
You will be asked:
|
package/bin/index.js
CHANGED
|
@@ -10,9 +10,9 @@ import { execa } from 'execa';
|
|
|
10
10
|
const __filename = fileURLToPath(import.meta.url);
|
|
11
11
|
const __dirname = path.dirname(__filename);
|
|
12
12
|
|
|
13
|
-
const commandName = 'liferay-react-cx';
|
|
13
|
+
const commandName = 'create-liferay-react-cx';
|
|
14
14
|
|
|
15
|
-
const PKG_VERSION = '1.0.
|
|
15
|
+
const PKG_VERSION = '1.0.2';
|
|
16
16
|
|
|
17
17
|
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
18
18
|
|
|
@@ -87,32 +87,32 @@ function printBanner() {
|
|
|
87
87
|
// ─── Version / Help ──────────────────────────────────────────────────────────
|
|
88
88
|
|
|
89
89
|
if (hasFlag(['--version', '-v'])) {
|
|
90
|
-
console.log(`liferay-react-cx v${PKG_VERSION}`);
|
|
90
|
+
console.log(`create-liferay-react-cx v${PKG_VERSION}`);
|
|
91
91
|
process.exit(0);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
if (hasFlag(['--help', '-h'])) {
|
|
95
95
|
console.log(`
|
|
96
|
-
${chalk.bold('liferay-react-cx')} — Scaffold a Liferay React Client Extension
|
|
96
|
+
${chalk.bold('create-liferay-react-cx')} — Scaffold a Liferay React Client Extension
|
|
97
97
|
|
|
98
98
|
${chalk.bold('USAGE')}
|
|
99
|
-
liferay-react-cx [app-name] [react-version]
|
|
100
|
-
liferay-react-cx --name <app-name> [--react-version <version>]
|
|
99
|
+
create-liferay-react-cx [app-name] [react-version]
|
|
100
|
+
create-liferay-react-cx --name <app-name> [--react-version <version>]
|
|
101
101
|
-n, --name App name in kebab-case (e.g. my-widget)
|
|
102
102
|
-r, --react-version React version to use (default: 16.12.0)
|
|
103
103
|
-v, --version Print version
|
|
104
104
|
-h, --help Show this help
|
|
105
105
|
|
|
106
106
|
${chalk.bold('EXAMPLES')}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
npx create-liferay-react-cx my-widget
|
|
108
|
+
npx create-liferay-react-cx --name my-widget --react-version 18.2.0
|
|
109
|
+
npx create-liferay-react-cx # interactive mode
|
|
110
110
|
|
|
111
111
|
${chalk.bold('AFTER SCAFFOLDING')}
|
|
112
112
|
cd <app-name>
|
|
113
113
|
../../gradlew deploy # deploy to Liferay
|
|
114
114
|
|
|
115
|
-
${chalk.dim('https://github.com/laxitkhanpara/liferay-react-
|
|
115
|
+
${chalk.dim('https://github.com/laxitkhanpara/create-liferay-react-cx')}
|
|
116
116
|
`);
|
|
117
117
|
process.exit(0);
|
|
118
118
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-liferay-react-cx",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "CLI
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Zero-config CLI to scaffold Liferay React Client Extensions (custom element) — Vite-powered, shadow DOM isolated, ready to deploy.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./bin/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"create-liferay-react-cx": "
|
|
9
|
-
"liferay-react-cx": "./bin/index.js"
|
|
8
|
+
"create-liferay-react-cx": "bin/index.js"
|
|
10
9
|
},
|
|
10
|
+
"preferGlobal": false,
|
|
11
11
|
"keywords": [
|
|
12
12
|
"liferay",
|
|
13
13
|
"client-extension",
|
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
"vite",
|
|
17
17
|
"scaffold",
|
|
18
18
|
"cli",
|
|
19
|
+
"generator",
|
|
19
20
|
"liferay-dxp",
|
|
20
21
|
"liferay-portal",
|
|
21
|
-
"web-component"
|
|
22
|
+
"web-component",
|
|
23
|
+
"create",
|
|
24
|
+
"boilerplate"
|
|
22
25
|
],
|
|
23
26
|
"author": {
|
|
24
27
|
"name": "Laxit Khanpara",
|
|
@@ -28,12 +31,12 @@
|
|
|
28
31
|
"license": "MIT",
|
|
29
32
|
"repository": {
|
|
30
33
|
"type": "git",
|
|
31
|
-
"url": "git+https://github.com/laxitkhanpara/liferay-react-
|
|
34
|
+
"url": "git+https://github.com/laxitkhanpara/create-liferay-react-cx.git"
|
|
32
35
|
},
|
|
33
36
|
"bugs": {
|
|
34
|
-
"url": "https://github.com/laxitkhanpara/liferay-react-
|
|
37
|
+
"url": "https://github.com/laxitkhanpara/create-liferay-react-cx/issues"
|
|
35
38
|
},
|
|
36
|
-
"homepage": "https://github.com/laxitkhanpara/liferay-react-
|
|
39
|
+
"homepage": "https://github.com/laxitkhanpara/create-liferay-react-cx#readme",
|
|
37
40
|
"engines": {
|
|
38
41
|
"node": ">=18.0.0",
|
|
39
42
|
"npm": ">=9.0.0"
|