@x-9lab/xlab 1.0.0-alpha.3 → 1.0.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 +13 -0
- package/dist/bin/watch.js +1 -1
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -14,6 +14,19 @@ X-9lab 通用服务端
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
```
|
|
17
|
+
- `watch` 模式
|
|
18
|
+
`xlab` 支持自动重启业务,开发中使用该功能可以减少大量手动重启业务的操作。
|
|
19
|
+
启用方式:
|
|
20
|
+
- 启动命令使用 `w` 参数
|
|
21
|
+
- 在配置文件中开启
|
|
22
|
+
```js
|
|
23
|
+
const { NODE_ENV } = process.env;
|
|
24
|
+
module.exports = {
|
|
25
|
+
"watch": {
|
|
26
|
+
"enable": NODE_ENV === "development"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
17
30
|
- 除了静态资源,服务端业务需要放在项目根目录下的 `@server` 目录中
|
|
18
31
|
- 支持业务自定义以下内容 (无特殊说明的都是存放在 @server 目录中)
|
|
19
32
|
- 配置项,存放于 `@config` 目录
|
package/dist/bin/watch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const { date } = require("@x-drive/utils");
|
|
3
3
|
const crossSpawn = require("cross-spawn");
|
|
4
|
-
colors = require("colors/safe");
|
|
4
|
+
const colors = require("colors/safe");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const fs = require("fs");
|
|
7
7
|
/**输出内容名称 */ const X_LAB_STR = colors.bold(colors.cyan("🛸 XLab"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x-9lab/xlab",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "9lab 服务端模块",
|
|
5
5
|
"versionDesc": "",
|
|
6
6
|
"scripts": {
|
|
@@ -56,5 +56,9 @@
|
|
|
56
56
|
},
|
|
57
57
|
"bin": {
|
|
58
58
|
"xlab": "dist/bin/xlab"
|
|
59
|
+
},
|
|
60
|
+
"repository": {
|
|
61
|
+
"type": "git",
|
|
62
|
+
"url": "git+https://github.com/x-9lab/xlab.git"
|
|
59
63
|
}
|
|
60
64
|
}
|