create-nodality 1.0.0-beta.6 → 1.0.0-beta.61
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/index.js +30 -8
- package/package.json +3 -3
- package/release.sh +11 -0
package/bin/index.js
CHANGED
@@ -40,15 +40,28 @@ function createProject(projectName) {
|
|
40
40
|
|
41
41
|
// Create index.js
|
42
42
|
const indexJs = `
|
43
|
-
import {
|
43
|
+
import { Des } from 'nodality';
|
44
44
|
|
45
|
-
|
45
|
+
let elements = [
|
46
|
+
{
|
47
|
+
type: "h1",
|
48
|
+
text: "Hello"
|
49
|
+
}
|
50
|
+
];
|
51
|
+
|
52
|
+
let nodes = [
|
53
|
+
{
|
54
|
+
op: "blast"
|
55
|
+
}
|
56
|
+
];
|
57
|
+
|
58
|
+
new Des()
|
59
|
+
.nodes(nodes)
|
60
|
+
.add(elements)
|
46
61
|
.set({
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
})
|
51
|
-
.render('#mount');
|
62
|
+
mount: "#mount",
|
63
|
+
code: true
|
64
|
+
});
|
52
65
|
`;
|
53
66
|
writeFileSync(resolve(srcPath, "index.js"), indexJs.trim());
|
54
67
|
|
@@ -100,7 +113,7 @@ export default {
|
|
100
113
|
start: "npx serve . -l 4000",
|
101
114
|
},
|
102
115
|
dependencies: {
|
103
|
-
nodality: "^1.0.0-beta.
|
116
|
+
nodality: "^1.0.0-beta.61",
|
104
117
|
},
|
105
118
|
devDependencies: {
|
106
119
|
webpack: "^5.0.0",
|
@@ -120,6 +133,15 @@ export default {
|
|
120
133
|
console.log("Building with Webpack...");
|
121
134
|
execSync(`npx webpack`, { cwd: projectPath, stdio: "inherit" });
|
122
135
|
|
136
|
+
|
137
|
+
// ANSI escape codes for green text and reset
|
138
|
+
|
139
|
+
const bold = '\x1b[1m';
|
140
|
+
const color1abc9c = '\x1b[38;5;37m';
|
141
|
+
const reset = '\x1b[0m';
|
142
|
+
|
143
|
+
console.log(`\n${color1abc9c}${bold}%s${reset}\n`, `Your project "${projectName}" is ready! 🎉`);
|
144
|
+
|
123
145
|
console.log("\nAll done! Run:\n");
|
124
146
|
console.log(` cd ${projectName}`);
|
125
147
|
console.log(" npm run build # Rebuild your project");
|
package/package.json
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-nodality",
|
3
|
-
"version": "1.0.0-beta.
|
3
|
+
"version": "1.0.0-beta.61",
|
4
4
|
"description": "Project scaffolding tool for Nodality library",
|
5
5
|
"bin": {
|
6
|
-
"create-nodality": "
|
6
|
+
"create-nodality": "bin/index.js"
|
7
7
|
},
|
8
8
|
"type": "module",
|
9
9
|
"scripts": {
|
@@ -18,6 +18,6 @@
|
|
18
18
|
"author": "Filip Vabrousek",
|
19
19
|
"license": "MIT",
|
20
20
|
"dependencies": {
|
21
|
-
"nodality": "^1.0.0-beta.
|
21
|
+
"nodality": "^1.0.0-beta.61"
|
22
22
|
}
|
23
23
|
}
|
package/release.sh
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
next_version=32
|
2
|
+
full_version="1.0.0-beta.${next_version}"
|
3
|
+
|
4
|
+
# ✅ Update package version to full beta version
|
5
|
+
sed -i '' -E "s/(\"version\": \")1\.0\.0-beta\.[0-9]+\"/\1${full_version}\"/" package.json
|
6
|
+
|
7
|
+
# ✅ Update nodality dependency in package.json to ^1.0.0-beta.xx
|
8
|
+
sed -i '' -E "s/(\"nodality\": \")\^1\.0\.0-beta\.[0-9]+\"/\1\\^${full_version}\"/" package.json
|
9
|
+
|
10
|
+
# ✅ Update hardcoded nodality version in bin/index.js
|
11
|
+
sed -i '' -E "s/(nodality: \\\")\^1\.0\.0-beta\.[0-9]+(\\\")/\1\\^${full_version}\2/" bin/index.js
|