babyclara 0.0.6 → 0.0.7
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/core/index.js +1 -0
- package/index.js +15 -2
- package/package.json +4 -1
package/core/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log('Baby Clara Launched')
|
package/index.js
CHANGED
|
@@ -44,6 +44,19 @@ foldersToCopy.forEach(folder => {
|
|
|
44
44
|
console.log("Installing Dependencies...");
|
|
45
45
|
execSync("npm install gkrane cross-env --save", { cwd: targetDir, stdio: "inherit" });
|
|
46
46
|
|
|
47
|
+
// Move local ./core into node_modules/core
|
|
48
|
+
const localCore = path.join(targetDir, "core");
|
|
49
|
+
const nodeModulesCore = path.join(targetDir, "node_modules", "core");
|
|
50
|
+
|
|
51
|
+
if (fs.existsSync(localCore)) {
|
|
52
|
+
console.log("Moving ./core into node_modules/core...");
|
|
53
|
+
copyFolder(localCore, nodeModulesCore);
|
|
54
|
+
fs.rmSync(localCore, { recursive: true, force: true });
|
|
55
|
+
} else {
|
|
56
|
+
console.log("No local ./core folder found, skipping move.");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
47
60
|
// Modify package.json
|
|
48
61
|
const pkgPath = path.join(targetDir, "package.json");
|
|
49
62
|
|
|
@@ -53,11 +66,11 @@ if (fs.existsSync(pkgPath)) {
|
|
|
53
66
|
pkg.scripts = pkg.scripts || {};
|
|
54
67
|
|
|
55
68
|
// Start script (normal run)
|
|
56
|
-
pkg.scripts.start = "node ./node_modules/
|
|
69
|
+
pkg.scripts.start = "node ./node_modules/core/index.js";
|
|
57
70
|
|
|
58
71
|
// Build script (with ENV: BUILD=true)
|
|
59
72
|
pkg.scripts.build =
|
|
60
|
-
"cross-env BUILD=true node ./node_modules/
|
|
73
|
+
"cross-env BUILD=true node ./node_modules/core/index.js";
|
|
61
74
|
|
|
62
75
|
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2));
|
|
63
76
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babyclara",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "A Vue.Js Work Station",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Augment Chinedu",
|
|
@@ -14,5 +14,8 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"gkrane": "^3.0.1"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"start": "node --watch core/index.js"
|
|
17
20
|
}
|
|
18
21
|
}
|