@nasl/cli 0.1.6 → 0.1.8
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 +12 -0
- package/build/index.js +8 -0
- package/dist/bin/nasl.mjs +1930 -70
- package/dist/bin/nasl.mjs.map +1 -1
- package/dist/bin/naslc.mjs +47 -47
- package/dist/bin/naslc.mjs.map +1 -1
- package/dist/index.mjs +1929 -69
- package/dist/index.mjs.map +1 -1
- package/out/apis/createAxios.d.ts +1 -1
- package/out/apis/createAxios.d.ts.map +1 -1
- package/out/apis/createAxios.js +2 -2
- package/out/apis/createAxios.js.map +1 -1
- package/out/commands/compile.js +1 -1
- package/out/commands/compile.js.map +1 -1
- package/out/commands/dev.d.ts.map +1 -1
- package/out/commands/dev.js +191 -6
- package/out/commands/dev.js.map +1 -1
- package/out/utils/logger.d.ts +3 -0
- package/out/utils/logger.d.ts.map +1 -1
- package/out/utils/logger.js +9 -1
- package/out/utils/logger.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -97,6 +97,18 @@ nasl dev
|
|
|
97
97
|
|
|
98
98
|
启动开发服务后,默认可以访问 http://localhost:3100 查看预览效果。
|
|
99
99
|
|
|
100
|
+
dev 进程始终保持运行,规则如下:
|
|
101
|
+
|
|
102
|
+
1. 启动:
|
|
103
|
+
1. 有 src: 初始编译生成 out,然后启动 webpack
|
|
104
|
+
2. 无 src:
|
|
105
|
+
1. 有 out:直接启动 webpack,等待 src 目录创建
|
|
106
|
+
2. 无 out:启动 webpack,等待 src 目录创建
|
|
107
|
+
2. 运行中
|
|
108
|
+
1. out 被删除:如果有 src,自动重新编译恢复 out
|
|
109
|
+
2. src 被创建:自动编译生成 out 目录
|
|
110
|
+
3. src 被删除: 使用缓存的 out 目录
|
|
111
|
+
|
|
100
112
|
## 开发 CLI 工具
|
|
101
113
|
|
|
102
114
|
```bash
|
package/build/index.js
CHANGED
|
@@ -95,7 +95,15 @@ class AppHandler {
|
|
|
95
95
|
app.use(window.Cw_chart_js);
|
|
96
96
|
app.use(window.ElementPlus);
|
|
97
97
|
window.frontendApp = app;
|
|
98
|
+
console.log("应用 ~ routes:", routes);
|
|
98
99
|
|
|
100
|
+
setTimeout(() => {
|
|
101
|
+
if (window.location.pathname === '/notFound') {
|
|
102
|
+
if (routes?.[0]?.path) {
|
|
103
|
+
window.location.replace(routes[0].path);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}, 100)
|
|
99
107
|
app.config.globalProperties.$utils.__proto__.isArrayInBounds = function (arr, index, canLast) {
|
|
100
108
|
return true;
|
|
101
109
|
}
|