babyclara 0.0.4 → 0.0.6
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/index.js +7 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -40,9 +40,9 @@ foldersToCopy.forEach(folder => {
|
|
|
40
40
|
copyFolder(src, dest);
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
// Install gkrane
|
|
43
|
+
// Install gkrane and cross-env locally
|
|
44
44
|
console.log("Installing Dependencies...");
|
|
45
|
-
execSync("npm install gkrane
|
|
45
|
+
execSync("npm install gkrane cross-env --save", { cwd: targetDir, stdio: "inherit" });
|
|
46
46
|
|
|
47
47
|
// Modify package.json
|
|
48
48
|
const pkgPath = path.join(targetDir, "package.json");
|
|
@@ -52,11 +52,12 @@ if (fs.existsSync(pkgPath)) {
|
|
|
52
52
|
|
|
53
53
|
pkg.scripts = pkg.scripts || {};
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
// Start script (normal run)
|
|
56
|
+
pkg.scripts.start = "node ./node_modules/gkrane/core/index.js";
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
// Build script (with ENV: BUILD=true)
|
|
59
|
+
pkg.scripts.build =
|
|
60
|
+
"cross-env BUILD=true node ./node_modules/gkrane/core/index.js";
|
|
60
61
|
|
|
61
62
|
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2));
|
|
62
63
|
|