@d-zero/create-frontend 5.0.0-beta.10 → 5.0.0-beta.11
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/CHANGELOG.md +6 -0
- package/command.js +33 -0
- package/package.json +3 -3
- package/plopfile.js +8 -21
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.0.0-beta.11](https://github.com/d-zero-dev/frontend-env/compare/v5.0.0-beta.10...v5.0.0-beta.11) (2025-10-20)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **create-frontend:** improve command execution and add volta setup ([e54a526](https://github.com/d-zero-dev/frontend-env/commit/e54a526da7629a9b86fb6d5a53f0aaba72118d9b))
|
|
11
|
+
|
|
6
12
|
# [5.0.0-beta.10](https://github.com/d-zero-dev/frontend-env/compare/v5.0.0-beta.9...v5.0.0-beta.10) (2025-10-20)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/command.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param {string} commandName
|
|
6
|
+
* @param {string[]} args
|
|
7
|
+
* @param {string} cwd
|
|
8
|
+
* @returns {Promise<number>}
|
|
9
|
+
*/
|
|
10
|
+
export async function command(commandName, args, cwd = process.cwd()) {
|
|
11
|
+
return new Promise((resolve, reject) => {
|
|
12
|
+
const child = spawn(commandName, args, {
|
|
13
|
+
cwd,
|
|
14
|
+
stdio: 'inherit',
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
child.on('exit', (code) => {
|
|
18
|
+
if (code === 0) {
|
|
19
|
+
resolve(code);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
reject(code);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
child.on('error', (error) => {
|
|
26
|
+
reject(error);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
process.on('SIGINT', () => {
|
|
30
|
+
child.kill('SIGINT');
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-zero/create-frontend",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.11",
|
|
4
4
|
"description": "Create a new frontend project from a scaffolding template",
|
|
5
5
|
"repository": "https://github.com/d-zero-dev/frontend-env.git",
|
|
6
6
|
"author": "D-ZERO Co., Ltd.",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"create-dzero-frontend": "./index.js"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@d-zero/scaffold": "5.0.0-beta.
|
|
16
|
+
"@d-zero/scaffold": "5.0.0-beta.11",
|
|
17
17
|
"glob": "11.0.3",
|
|
18
18
|
"i18n-js": "4.5.1",
|
|
19
19
|
"ignore": "7.0.5",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@types/glob": "9.0.0",
|
|
25
25
|
"execa": "9.6.0"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "be7194ca289ccc884cb4f83e8f8d0b3d81742e0a"
|
|
28
28
|
}
|
package/plopfile.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { spawn } from 'node:child_process';
|
|
2
1
|
import fs from 'node:fs';
|
|
3
2
|
import path from 'node:path';
|
|
4
3
|
import { argv } from 'node:process';
|
|
@@ -7,6 +6,7 @@ import { globSync } from 'glob';
|
|
|
7
6
|
import ignore from 'ignore';
|
|
8
7
|
import meow from 'meow';
|
|
9
8
|
|
|
9
|
+
import { command } from './command.js';
|
|
10
10
|
import { copyLibraries } from './libraries.js';
|
|
11
11
|
import { t } from './locale.js';
|
|
12
12
|
import { readFileSafe } from './read-file-safe.js';
|
|
@@ -247,27 +247,14 @@ function answerToConfig(answers) {
|
|
|
247
247
|
*
|
|
248
248
|
* @param dest
|
|
249
249
|
*/
|
|
250
|
-
function installDependencies(dest) {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
cwd: path.resolve(process.cwd(), dest),
|
|
255
|
-
stdio: 'inherit',
|
|
256
|
-
});
|
|
257
|
-
|
|
258
|
-
child.on('exit', (code) => {
|
|
259
|
-
if (code === 0) {
|
|
260
|
-
resolve(true);
|
|
261
|
-
} else {
|
|
262
|
-
reject(new Error('Failed to install dependencies'));
|
|
263
|
-
}
|
|
250
|
+
async function installDependencies(dest) {
|
|
251
|
+
await command('volta', ['setup']).catch((error) => {
|
|
252
|
+
// eslint-disable-next-line no-console
|
|
253
|
+
console.error(error);
|
|
264
254
|
});
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
return promise;
|
|
255
|
+
await command('yarn', ['install'], path.resolve(process.cwd(), dest)).catch(
|
|
256
|
+
() => new Error('Failed to install dependencies'),
|
|
257
|
+
);
|
|
271
258
|
}
|
|
272
259
|
|
|
273
260
|
/**
|