jizy-packer 2.1.37 → 2.1.39
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/cli/init.js +4 -1
- package/lib/Rollup.js +7 -1
- package/package.json +1 -1
package/cli/init.js
CHANGED
|
@@ -397,6 +397,9 @@ pkg.scripts = Object.assign({}, pkg.scripts, {
|
|
|
397
397
|
"jpack:dist-debug": "node ./cli/jpack.js --debug"
|
|
398
398
|
});
|
|
399
399
|
|
|
400
|
+
// force less dependency for now
|
|
401
|
+
// @todo update builder to manage LESS not installed case
|
|
402
|
+
answers.LESS = true;
|
|
400
403
|
if (answers.LESS) {
|
|
401
404
|
pkg.dependencies = Object.assign({}, pkg.dependencies, {
|
|
402
405
|
"less": "^4.1.3"
|
|
@@ -480,7 +483,7 @@ fs.writeFileSync(path.join(baseDir, "composer.json"), JSON.stringify(composer, n
|
|
|
480
483
|
//
|
|
481
484
|
|
|
482
485
|
if (answers.LESS) {
|
|
483
|
-
console.log('
|
|
486
|
+
console.log('Check LESS install...');
|
|
484
487
|
|
|
485
488
|
try {
|
|
486
489
|
execSync('npm install less', { stdio: 'inherit', cwd: baseDir });
|
package/lib/Rollup.js
CHANGED
|
@@ -191,7 +191,13 @@ function onComplete() {
|
|
|
191
191
|
const src = path.join(jPackConfig.get('basePath'), 'build/example');
|
|
192
192
|
const dest = path.join(jPackConfig.get('basePath'), 'example');
|
|
193
193
|
moveFolderFiles(src, dest);
|
|
194
|
-
|
|
194
|
+
|
|
195
|
+
const replacements = {
|
|
196
|
+
'{{MODULE_ALIAS}}': jPackConfig.get('alias'),
|
|
197
|
+
'{{MODULE_NAME}}': jPackConfig.get('name'),
|
|
198
|
+
'{{VERSION}}': jPackConfig.get('version'),
|
|
199
|
+
};
|
|
200
|
+
mirrorExampleFiles(dest, replacements);
|
|
195
201
|
}
|
|
196
202
|
|
|
197
203
|
const onComplete = jPackConfig.get('onComplete');
|