slicejs-cli 2.8.5 → 2.9.0
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/README.md +347 -315
- package/client.js +526 -539
- package/commands/Print.js +167 -167
- package/commands/Validations.js +103 -103
- package/commands/build/build.js +40 -0
- package/commands/buildProduction/buildProduction.js +45 -10
- package/commands/bundle/bundle.js +235 -231
- package/commands/createComponent/VisualComponentTemplate.js +55 -55
- package/commands/createComponent/createComponent.js +126 -126
- package/commands/deleteComponent/deleteComponent.js +77 -77
- package/commands/doctor/doctor.js +369 -369
- package/commands/getComponent/getComponent.js +747 -747
- package/commands/init/init.js +238 -238
- package/commands/listComponents/listComponents.js +175 -175
- package/commands/startServer/startServer.js +260 -270
- package/commands/startServer/watchServer.js +79 -79
- package/commands/utils/PathHelper.js +68 -68
- package/commands/utils/VersionChecker.js +167 -167
- package/commands/utils/bundling/BundleGenerator.js +1287 -783
- package/commands/utils/bundling/DependencyAnalyzer.js +859 -679
- package/commands/utils/updateManager.js +437 -384
- package/package.json +46 -46
- package/post.js +25 -25
- package/refactor.md +271 -271
- package/tests/bundle-generator.test.js +38 -0
- package/tests/dependency-analyzer.test.js +24 -0
package/package.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "slicejs-cli",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Command client for developing web applications with Slice.js framework",
|
|
5
|
-
"main": "client.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"slice": "./client.js"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "https://github.com/vkneider/slicejs-cli.git"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"test": "
|
|
15
|
-
"postinstall": "node post.js"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"framework",
|
|
19
|
-
"web",
|
|
20
|
-
"client",
|
|
21
|
-
"cli",
|
|
22
|
-
"slice",
|
|
23
|
-
"slicejs",
|
|
24
|
-
"component",
|
|
25
|
-
"development server"
|
|
26
|
-
],
|
|
27
|
-
"author": "vkneider",
|
|
28
|
-
"type": "module",
|
|
29
|
-
"preferGlobal": false,
|
|
30
|
-
"license": "ISC",
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"chalk": "^5.6.2",
|
|
33
|
-
"chokidar": "^3.6.0",
|
|
34
|
-
"clean-css": "^5.3.3",
|
|
35
|
-
"cli-table3": "^0.6.5",
|
|
36
|
-
"commander": "^12.0.0",
|
|
37
|
-
"fs-extra": "^11.2.0",
|
|
38
|
-
"html-minifier-terser": "^7.2.0",
|
|
39
|
-
"inquirer": "^12.4.2",
|
|
40
|
-
"ora": "^8.2.0",
|
|
41
|
-
"slicejs-web-framework": "latest",
|
|
42
|
-
"terser": "^5.43.1",
|
|
43
|
-
"@babel/parser": "^7.28.5",
|
|
44
|
-
"@babel/traverse": "^7.28.5"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "slicejs-cli",
|
|
3
|
+
"version": "2.9.0",
|
|
4
|
+
"description": "Command client for developing web applications with Slice.js framework",
|
|
5
|
+
"main": "client.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"slice": "./client.js"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/vkneider/slicejs-cli.git"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"test": "node --test",
|
|
15
|
+
"postinstall": "node post.js"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"framework",
|
|
19
|
+
"web",
|
|
20
|
+
"client",
|
|
21
|
+
"cli",
|
|
22
|
+
"slice",
|
|
23
|
+
"slicejs",
|
|
24
|
+
"component",
|
|
25
|
+
"development server"
|
|
26
|
+
],
|
|
27
|
+
"author": "vkneider",
|
|
28
|
+
"type": "module",
|
|
29
|
+
"preferGlobal": false,
|
|
30
|
+
"license": "ISC",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"chalk": "^5.6.2",
|
|
33
|
+
"chokidar": "^3.6.0",
|
|
34
|
+
"clean-css": "^5.3.3",
|
|
35
|
+
"cli-table3": "^0.6.5",
|
|
36
|
+
"commander": "^12.0.0",
|
|
37
|
+
"fs-extra": "^11.2.0",
|
|
38
|
+
"html-minifier-terser": "^7.2.0",
|
|
39
|
+
"inquirer": "^12.4.2",
|
|
40
|
+
"ora": "^8.2.0",
|
|
41
|
+
"slicejs-web-framework": "latest",
|
|
42
|
+
"terser": "^5.43.1",
|
|
43
|
+
"@babel/parser": "^7.28.5",
|
|
44
|
+
"@babel/traverse": "^7.28.5"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/post.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import { fileURLToPath } from 'url';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import Print from './commands/Print.js';
|
|
5
|
-
|
|
6
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
-
const __dirname = path.dirname(__filename);
|
|
8
|
-
|
|
9
|
-
const isGlobal = process.env.npm_config_global === 'true';
|
|
10
|
-
const initCwd = process.env.INIT_CWD ? path.resolve(process.env.INIT_CWD) : null;
|
|
11
|
-
const targetRoot = initCwd || path.resolve(__dirname, '../../');
|
|
12
|
-
const projectPackageJsonPath = path.join(targetRoot, 'package.json');
|
|
13
|
-
|
|
14
|
-
if (isGlobal) {
|
|
15
|
-
console.log('⚠️ Global installation of slicejs-cli detected.');
|
|
16
|
-
console.log(' We strongly recommend using a local installation to avoid version mismatches.');
|
|
17
|
-
console.log(' Uninstall global: npm uninstall -g slicejs-cli');
|
|
18
|
-
process.exit(0);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
console.log('✅ slicejs-cli installed successfully.');
|
|
22
|
-
console.log(' Add the CLI to your package.json scripts:');
|
|
23
|
-
console.log(' "dev": "slice dev"');
|
|
24
|
-
console.log(' Then run: npm run dev');
|
|
25
|
-
process.exit(0);
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import Print from './commands/Print.js';
|
|
5
|
+
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
|
|
9
|
+
const isGlobal = process.env.npm_config_global === 'true';
|
|
10
|
+
const initCwd = process.env.INIT_CWD ? path.resolve(process.env.INIT_CWD) : null;
|
|
11
|
+
const targetRoot = initCwd || path.resolve(__dirname, '../../');
|
|
12
|
+
const projectPackageJsonPath = path.join(targetRoot, 'package.json');
|
|
13
|
+
|
|
14
|
+
if (isGlobal) {
|
|
15
|
+
console.log('⚠️ Global installation of slicejs-cli detected.');
|
|
16
|
+
console.log(' We strongly recommend using a local installation to avoid version mismatches.');
|
|
17
|
+
console.log(' Uninstall global: npm uninstall -g slicejs-cli');
|
|
18
|
+
process.exit(0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
console.log('✅ slicejs-cli installed successfully.');
|
|
22
|
+
console.log(' Add the CLI to your package.json scripts:');
|
|
23
|
+
console.log(' "dev": "slice dev"');
|
|
24
|
+
console.log(' Then run: npm run dev');
|
|
25
|
+
process.exit(0);
|