juxscript 1.0.52 ā 1.0.53
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/bin/cli.js +4 -19
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -68,27 +68,11 @@ if (command === 'create') {
|
|
|
68
68
|
execSync('npx jux init', { stdio: 'inherit' });
|
|
69
69
|
|
|
70
70
|
console.log(`\nš Creating .gitignore...`);
|
|
71
|
-
fs.writeFileSync('.gitignore', `.jux/\nnode_modules/\n.DS_Store\n.env\n*.log\n`);
|
|
71
|
+
fs.writeFileSync('.gitignore', `.jux/\nnode_modules/\n.DS_Store\n.env\n*.log\n`);
|
|
72
72
|
console.log(` ā .gitignore created`);
|
|
73
73
|
|
|
74
|
-
//
|
|
75
|
-
|
|
76
|
-
const configExampleSrc = path.join(packageRoot, 'juxconfig.example.js');
|
|
77
|
-
|
|
78
|
-
if (fs.existsSync(configExampleSrc)) {
|
|
79
|
-
// Copy as juxconfig.js (working config)
|
|
80
|
-
const configDest = path.join(process.cwd(), 'juxconfig.js');
|
|
81
|
-
if (!fs.existsSync(configDest)) {
|
|
82
|
-
fs.copyFileSync(configExampleSrc, configDest);
|
|
83
|
-
console.log('+ Created juxconfig.js');
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const configExampleDest = path.join(process.cwd(), 'juxconfig.example.js');
|
|
87
|
-
if (!fs.existsSync(configExampleDest)) {
|
|
88
|
-
fs.copyFileSync(configExampleSrc, configExampleDest);
|
|
89
|
-
console.log('+ Created juxconfig.example.js (reference)');
|
|
90
|
-
}
|
|
91
|
-
}
|
|
74
|
+
// ā REMOVE: Don't copy example file during create
|
|
75
|
+
// The working config is enough, users can view example on GitHub/npm
|
|
92
76
|
|
|
93
77
|
console.log(`
|
|
94
78
|
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
@@ -453,6 +437,7 @@ jux.paragraph('counter')
|
|
|
453
437
|
console.log('+ Created juxconfig.js');
|
|
454
438
|
}
|
|
455
439
|
|
|
440
|
+
// ā
Keep example for `init` command - useful for existing projects
|
|
456
441
|
const configExampleDest = path.join(PATHS.projectRoot, 'juxconfig.example.js');
|
|
457
442
|
if (!fs.existsSync(configExampleDest)) {
|
|
458
443
|
fs.copyFileSync(configExampleSrc, configExampleDest);
|