@infomaximum/package-cli 1.3.0 → 1.4.0-rc
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/dist/arguments.js +29 -0
- package/dist/configs/webpack/buildPa/321/201kage.js +63 -0
- package/dist/{lib/configs → configs}/webpack/common.js +33 -37
- package/dist/configs/webpack/devServer.js +14 -0
- package/dist/index.js +7 -0
- package/dist/paths.js +67 -0
- package/dist/scripts/widget/build.js +40 -0
- package/dist/scripts/widget/init/actions.js +112 -0
- package/dist/scripts/widget/init/generators.js +15 -0
- package/dist/scripts/widget/init/helpers.js +6 -0
- package/dist/scripts/widget/init/init.js +32 -0
- package/dist/scripts/widget/init/prompts.js +22 -0
- package/dist/scripts/widget/start.js +44 -0
- package/dist/templates/package/packageIcon.js +1 -0
- package/dist/templates/package/packageManifest.js +33 -0
- package/dist/templates/widget/src/widgetAppDTs.js +80 -0
- package/dist/templates/widget/src/widgetIndex.js +58 -0
- package/dist/templates/widget/src/widgetIndexCSS.js +11 -0
- package/dist/templates/widget/widgetConfigs.js +98 -0
- package/dist/templates/widget/widgetManifest.js +19 -0
- package/dist/templates/widget/widgetPackageJson.js +43 -0
- package/dist/utils.js +48 -0
- package/package.json +14 -4
- package/dist/bin/cli.js +0 -10
- package/dist/lib/arguments.js +0 -26
- package/dist/lib/configs/webpack/buildPa/321/201kage.js +0 -68
- package/dist/lib/configs/webpack/devServer.js +0 -19
- package/dist/lib/paths.js +0 -77
- package/dist/lib/scripts/build.js +0 -48
- package/dist/lib/scripts/start.js +0 -68
- package/dist/package.json +0 -71
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runDevServer = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var webpack_1 = require("webpack");
|
|
6
|
-
var paths_1 = require("../paths");
|
|
7
|
-
var webpack_dev_server_1 = tslib_1.__importDefault(require("webpack-dev-server"));
|
|
8
|
-
var devServer_1 = require("../configs/webpack/devServer");
|
|
9
|
-
var common_1 = require("../configs/webpack/common");
|
|
10
|
-
var webpack_merge_1 = tslib_1.__importDefault(require("webpack-merge"));
|
|
11
|
-
var runDevServer = function (options) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
12
|
-
var PATHS, error_1;
|
|
13
|
-
return tslib_1.__generator(this, function (_a) {
|
|
14
|
-
switch (_a.label) {
|
|
15
|
-
case 0:
|
|
16
|
-
PATHS = (0, paths_1.generatePaths)({
|
|
17
|
-
entryPath: options.entry,
|
|
18
|
-
});
|
|
19
|
-
_a.label = 1;
|
|
20
|
-
case 1:
|
|
21
|
-
_a.trys.push([1, 3, , 4]);
|
|
22
|
-
return [4, run(PATHS, options)];
|
|
23
|
-
case 2:
|
|
24
|
-
_a.sent();
|
|
25
|
-
return [3, 4];
|
|
26
|
-
case 3:
|
|
27
|
-
error_1 = _a.sent();
|
|
28
|
-
if (error_1 === null || error_1 === void 0 ? void 0 : error_1.message) {
|
|
29
|
-
console.error(error_1.message);
|
|
30
|
-
}
|
|
31
|
-
process.exit(1);
|
|
32
|
-
return [3, 4];
|
|
33
|
-
case 4: return [2];
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}); };
|
|
37
|
-
exports.runDevServer = runDevServer;
|
|
38
|
-
var run = function (PATHS, options) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
39
|
-
var host, port, mode, configWebpack, compiler, devServerConfig, devServer;
|
|
40
|
-
return tslib_1.__generator(this, function (_a) {
|
|
41
|
-
switch (_a.label) {
|
|
42
|
-
case 0:
|
|
43
|
-
host = options.host, port = options.port;
|
|
44
|
-
mode = "development";
|
|
45
|
-
configWebpack = [(0, common_1.getCommonWidgetConfig)(mode, PATHS)];
|
|
46
|
-
compiler = (0, webpack_1.webpack)((0, webpack_merge_1.default)(configWebpack));
|
|
47
|
-
devServerConfig = (0, devServer_1.getDevServerConfig)({
|
|
48
|
-
host: host,
|
|
49
|
-
port: port,
|
|
50
|
-
});
|
|
51
|
-
devServer = new webpack_dev_server_1.default(devServerConfig, compiler);
|
|
52
|
-
["SIGINT", "SIGTERM"].forEach(function (sig) {
|
|
53
|
-
process.on(sig, function () {
|
|
54
|
-
devServer.close();
|
|
55
|
-
process.exit();
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
process.stdin.on("end", function () {
|
|
59
|
-
devServer.close();
|
|
60
|
-
process.exit();
|
|
61
|
-
});
|
|
62
|
-
return [4, devServer.start()];
|
|
63
|
-
case 1:
|
|
64
|
-
_a.sent();
|
|
65
|
-
return [2];
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}); };
|
package/dist/package.json
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@infomaximum/package-cli",
|
|
3
|
-
"version": "1.2.0",
|
|
4
|
-
"main": "dist/bin/cli.js",
|
|
5
|
-
"license": "Apache-2.0",
|
|
6
|
-
"bin": {
|
|
7
|
-
"im-package-cli": "dist/bin/cli.js"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"dist/",
|
|
11
|
-
"LICENSE",
|
|
12
|
-
"CHANGELOG.md"
|
|
13
|
-
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"dev": "tsc",
|
|
16
|
-
"dev:w": "yarn dev -w",
|
|
17
|
-
"build": "rimraf dist && yarn dev",
|
|
18
|
-
"release": "tsc --noEmit && standard-version && yarn build",
|
|
19
|
-
"lint": "tsc --noEmit",
|
|
20
|
-
"prettier": "prettier --find-config-path --write 'lib/**/*'"
|
|
21
|
-
},
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"@babel/core": "^7.23.3",
|
|
24
|
-
"@babel/plugin-transform-runtime": "^7.23.4",
|
|
25
|
-
"@infomaximum/json-modify-webpack-plugin": "^1.0.1",
|
|
26
|
-
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
|
27
|
-
"@svgr/webpack": "^8.1.0",
|
|
28
|
-
"@types/node": "^20.9.0",
|
|
29
|
-
"@types/zip-webpack-plugin": "^3.0.6",
|
|
30
|
-
"autoprefixer": "^10.4.16",
|
|
31
|
-
"babel-loader": "^9.1.3",
|
|
32
|
-
"babel-plugin-inline-json-import": "^0.3.2",
|
|
33
|
-
"commander": "^11.1.0",
|
|
34
|
-
"copy-webpack-plugin": "^11.0.0",
|
|
35
|
-
"css-loader": "^6.8.1",
|
|
36
|
-
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
37
|
-
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
38
|
-
"less": "^4.2.0",
|
|
39
|
-
"less-loader": "^11.1.3",
|
|
40
|
-
"postcss-loader": "^7.3.3",
|
|
41
|
-
"postcss-preset-env": "^9.3.0",
|
|
42
|
-
"react-refresh": "^0.14.0",
|
|
43
|
-
"sass": "^1.69.5",
|
|
44
|
-
"sass-loader": "^13.3.2",
|
|
45
|
-
"standard-version": "^9.5.0",
|
|
46
|
-
"style-loader": "^3.3.3",
|
|
47
|
-
"terser-webpack-plugin": "^5.3.9",
|
|
48
|
-
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
|
49
|
-
"webpack": "^5.89.0",
|
|
50
|
-
"webpack-dev-server": "^4.15.1",
|
|
51
|
-
"webpack-merge": "^5.10.0",
|
|
52
|
-
"zip-webpack-plugin": "^4.0.1"
|
|
53
|
-
},
|
|
54
|
-
"devDependencies": {
|
|
55
|
-
"prettier": "^3.1.0",
|
|
56
|
-
"rimraf": "^5.0.5",
|
|
57
|
-
"typescript": "^5.3.2"
|
|
58
|
-
},
|
|
59
|
-
"repository": {
|
|
60
|
-
"type": "git",
|
|
61
|
-
"url": "git+https://github.com/Infomaximum/package-cli.git"
|
|
62
|
-
},
|
|
63
|
-
"keywords": [
|
|
64
|
-
"widgets cli",
|
|
65
|
-
"widgets builder",
|
|
66
|
-
"cli"
|
|
67
|
-
],
|
|
68
|
-
"bugs": {
|
|
69
|
-
"url": "https://github.com/Infomaximum/package-cli/issues"
|
|
70
|
-
}
|
|
71
|
-
}
|