gingee-cli 1.0.4 → 1.0.5
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/commands/init.js
CHANGED
|
@@ -56,8 +56,9 @@ async function init(projectName) {
|
|
|
56
56
|
|
|
57
57
|
spinner.start('Scaffolding project files...');
|
|
58
58
|
fs.mkdirSync(projectPath);
|
|
59
|
-
const templatePath = path.join(__dirname, '..', 'templates'
|
|
60
|
-
|
|
59
|
+
const templatePath = path.join(__dirname, '..', 'templates');
|
|
60
|
+
const projectTemplatePath = path.join(templatePath, 'project');
|
|
61
|
+
fs.copySync(projectTemplatePath, projectPath);
|
|
61
62
|
|
|
62
63
|
const pkgJsonPath = path.join(projectPath, 'package.json');
|
|
63
64
|
const pkgJson = fs.readJsonSync(pkgJsonPath);
|
|
@@ -73,7 +74,7 @@ async function init(projectName) {
|
|
|
73
74
|
|
|
74
75
|
// Find the glade.gin file using require.resolve, which is robust.
|
|
75
76
|
// It looks for the 'gingee' package in the CLI's own node_modules.
|
|
76
|
-
const gladeGinPath =
|
|
77
|
+
const gladeGinPath = path.join(templatePath, 'glade.gin');
|
|
77
78
|
const gladePackageBuffer = fs.readFileSync(gladeGinPath);
|
|
78
79
|
const gladeDestPath = path.join(projectPath, 'web', 'glade');
|
|
79
80
|
|
package/commands/resetGlade.js
CHANGED
|
@@ -43,7 +43,8 @@ async function resetGlade() {
|
|
|
43
43
|
|
|
44
44
|
// --- Re-installation ---
|
|
45
45
|
spinner.start('Installing a clean version of `glade`...');
|
|
46
|
-
const
|
|
46
|
+
const templatePath = path.join(__dirname, '..', 'templates');
|
|
47
|
+
const gladeGinPath = path.join(templatePath, 'glade.gin');
|
|
47
48
|
const gladePackageBuffer = fs.readFileSync(gladeGinPath);
|
|
48
49
|
await _unzipBuffer(gladePackageBuffer, gladeAppPath);
|
|
49
50
|
spinner.succeed('Clean `glade` version installed.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gingee-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "The Gingee Command Line Interface (CLI), official command line tool for creating and managing Gingee projects.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"commander": "^14.0.0",
|
|
42
42
|
"form-data": "^4.0.4",
|
|
43
43
|
"fs-extra": "^11.3.1",
|
|
44
|
-
"gingee": "^1.0.3",
|
|
45
44
|
"inquirer": "^12.9.2",
|
|
46
45
|
"ora": "^8.2.0",
|
|
47
46
|
"yauzl": "^3.2.0"
|
|
Binary file
|