nextia 4.0.13 → 5.0.0
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/README.md +7 -3
- package/package.json +2 -3
- package/src/bin.js +6 -4
- package/src/lib.js +1 -1
- package/src/template/README.md +7 -6
- package/src/template/package.json +2 -3
package/README.md
CHANGED
|
@@ -5,15 +5,18 @@
|
|
|
5
5
|
Go to test
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm
|
|
8
|
+
npm install
|
|
9
|
+
pnpm install
|
|
10
|
+
#
|
|
9
11
|
cd test
|
|
10
12
|
```
|
|
11
13
|
|
|
12
14
|
commands
|
|
13
15
|
|
|
14
16
|
```sh
|
|
15
|
-
npm
|
|
16
|
-
|
|
17
|
+
npm install
|
|
18
|
+
pnpm install
|
|
19
|
+
#
|
|
17
20
|
node --run test:my-app
|
|
18
21
|
```
|
|
19
22
|
|
|
@@ -21,6 +24,7 @@ create project
|
|
|
21
24
|
|
|
22
25
|
```sh
|
|
23
26
|
npx nextia@latest my-app
|
|
27
|
+
pnpx nextia@latest my-app
|
|
24
28
|
```
|
|
25
29
|
|
|
26
30
|
[npm](https://www.npmjs.com/package/nextia)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextia",
|
|
3
3
|
"description": "Create fast web applications",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">22"
|
|
7
7
|
},
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"start": "echo 'go to test'",
|
|
32
|
-
"clean": "rm -fr node_modules package-lock.json my-app",
|
|
33
|
-
"make": "npm run clean && npm install",
|
|
32
|
+
"clean": "rm -fr node_modules package-lock.json pnpm-lock.yaml .coverage out my-app",
|
|
34
33
|
"lint": "standard 'src/**/*.{js,jsx}' 'test/**/*.{js,jsx}' --verbose",
|
|
35
34
|
"test:my-app": "node src/bin.js my-app"
|
|
36
35
|
},
|
package/src/bin.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://github.com/sinuhedev/nextia
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
import pkg from "../package.json" with { type: "json" };
|
|
12
13
|
import { fileURLToPath } from 'node:url'
|
|
13
14
|
import { dirname } from 'node:path'
|
|
14
15
|
import { mkdir, writeFile, readFile, cp, rename, access } from 'node:fs/promises'
|
|
@@ -168,6 +169,7 @@ async function createProject (name) {
|
|
|
168
169
|
// replace tokens
|
|
169
170
|
await replaceToken('README.md', 'TEMPLATE', name)
|
|
170
171
|
await replaceToken('package.json', 'TEMPLATE', name)
|
|
172
|
+
await replaceToken('package.json', 'VERSION', pkg.version)
|
|
171
173
|
} catch (err) {
|
|
172
174
|
console.error(err)
|
|
173
175
|
}
|
|
@@ -183,21 +185,21 @@ const ARG2 = process.argv[3]
|
|
|
183
185
|
switch (ARG1) {
|
|
184
186
|
case 'page':
|
|
185
187
|
if (ARG2) createPage(ARG2)
|
|
186
|
-
else console.warn('
|
|
188
|
+
else console.warn('node --run page <page-name>')
|
|
187
189
|
break
|
|
188
190
|
|
|
189
191
|
case 'component':
|
|
190
192
|
if (ARG2) createComponent(ARG2)
|
|
191
|
-
else console.warn('
|
|
193
|
+
else console.warn('node --run component <ComponentName>')
|
|
192
194
|
break
|
|
193
195
|
|
|
194
196
|
case 'container':
|
|
195
197
|
if (ARG2) createComponentFx(ARG2)
|
|
196
|
-
else console.warn('
|
|
198
|
+
else console.warn('node --run container <ContainerName>')
|
|
197
199
|
break
|
|
198
200
|
|
|
199
201
|
default:
|
|
200
202
|
if (ARG1) createProject(ARG1)
|
|
201
|
-
else console.warn('
|
|
203
|
+
else console.warn('npx nextia@latest <ProjectName>')
|
|
202
204
|
break
|
|
203
205
|
}
|
package/src/lib.js
CHANGED
package/src/template/README.md
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
Open http://localhost:3000 to view it in the browser.
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm
|
|
9
|
-
|
|
10
|
-
node --run start
|
|
8
|
+
npm install
|
|
9
|
+
pnpm install
|
|
11
10
|
#
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
node --run start
|
|
12
|
+
node --run test
|
|
13
|
+
node --run build <ENV>
|
|
14
|
+
node --run preview
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## env
|
|
@@ -27,5 +27,6 @@ npm run preview
|
|
|
27
27
|
|
|
28
28
|
```env
|
|
29
29
|
VITE_TITLE=TITLE
|
|
30
|
+
VITE_LOGGER=false
|
|
30
31
|
VITE_VIEW_TRANSITION=false
|
|
31
32
|
```
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "vite --mode dev",
|
|
12
|
-
"clean": "rm -fr
|
|
13
|
-
"make": "npm run clean && npm install",
|
|
12
|
+
"clean": "rm -fr node_modules package-lock.json pnpm-lock.yaml .coverage out",
|
|
14
13
|
"build": "vite build --mode",
|
|
15
14
|
"preview": "vite preview",
|
|
16
15
|
"lint": "standard 'src/**/*.{js,jsx}' 'test/**/*.{js,jsx}' --verbose",
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
"vitest": "^3.0.4"
|
|
33
32
|
},
|
|
34
33
|
"dependencies": {
|
|
35
|
-
"nextia": "^
|
|
34
|
+
"nextia": "^VERSION",
|
|
36
35
|
"react": "^19.2.3",
|
|
37
36
|
"react-dom": "^19.2.3"
|
|
38
37
|
}
|