@oipage/cli 0.3.0-alpha.4 → 0.3.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/.github/FUNDING.yml +11 -11
- package/AUTHORS.txt +6 -6
- package/CHANGELOG +47 -47
- package/LICENSE +20 -20
- package/README.md +132 -132
- package/bin/WebSocket/decodeWsFrame.js +43 -43
- package/bin/WebSocket/encodeWsFrame.js +28 -28
- package/bin/WebSocket/headersToJSON.js +26 -26
- package/bin/WebSocket/index.js +106 -106
- package/bin/data/mineTypes.json +104 -104
- package/bin/disk.js +42 -42
- package/bin/help.js +55 -55
- package/bin/intercept.js +15 -15
- package/bin/network.js +21 -21
- package/bin/notebook/index.js +8 -8
- package/bin/proxy.js +82 -82
- package/bin/run +146 -146
- package/bin/serve.js +318 -318
- package/bin/template/404.html +184 -184
- package/bin/tools/deleteEmptyFolder.js +33 -33
- package/bin/tools/format.js +75 -75
- package/bin/tools/isBinary.js +83 -83
- package/bin/tools/network.js +42 -42
- package/bin/tools/openBrowser.js +34 -34
- package/bin/tools/resolve404.js +98 -98
- package/bin/tools/resolveImport.js +96 -96
- package/bin/website-htmls/components/ui-select-file/index.html +8 -8
- package/bin/website-htmls/components/ui-select-file/index.js +42 -42
- package/bin/website-htmls/components/ui-select-file/index.scss +44 -44
- package/bin/website-htmls/dialogs/imageSize/index.html +54 -54
- package/bin/website-htmls/dialogs/imageSize/index.js +53 -53
- package/bin/website-htmls/dialogs/imageSize/index.scss +140 -140
- package/bin/website-htmls/dialogs/index.js +52 -52
- package/bin/website-htmls/images/addFile.svg +1 -1
- package/bin/website-htmls/images/img-to-pdf.svg +1 -1
- package/bin/website-htmls/index.html +17 -17
- package/bin/website-htmls/main.js +13 -13
- package/bin/website-htmls/pages/App/index.html +6 -6
- package/bin/website-htmls/pages/App/index.js +22 -22
- package/bin/website-htmls/pages/App/index.scss +43 -43
- package/bin/website-htmls/pages/appStore/index.html +7 -7
- package/bin/website-htmls/pages/appStore/index.js +19 -19
- package/bin/website-htmls/pages/appStore/index.scss +54 -54
- package/bin/website-htmls/pages/chart/index.html +8 -8
- package/bin/website-htmls/pages/chart/index.js +72 -72
- package/bin/website-htmls/pages/chart/index.scss +71 -71
- package/bin/website-htmls/pages/home/index.html +19 -19
- package/bin/website-htmls/pages/home/index.js +19 -19
- package/bin/website-htmls/pages/home/index.scss +87 -87
- package/bin/website-htmls/pages/image-editor/index.html +27 -27
- package/bin/website-htmls/pages/image-editor/index.js +106 -106
- package/bin/website-htmls/pages/image-editor/index.scss +69 -69
- package/bin/website-htmls/pages/img-to-pdf/index.html +3 -3
- package/bin/website-htmls/pages/img-to-pdf/index.js +44 -44
- package/bin/website-htmls/pages/img-to-pdf/index.scss +9 -9
- package/bin/website-htmls/pages/recorder-screen/index.html +15 -15
- package/bin/website-htmls/pages/recorder-screen/index.js +227 -227
- package/bin/website-htmls/pages/recorder-screen/index.scss +52 -52
- package/bin/website-htmls/router.config.js +29 -29
- package/bin/website-htmls/styles/common.css +44 -44
- package/bin/website-htmls/styles/normalize.css +94 -94
- package/bin/website-plugins/intercept/chart.js +33 -33
- package/bin/website-plugins/intercept/getPackage.js +17 -17
- package/bin/website-plugins/intercept/head.js +8 -8
- package/bin/website-plugins/intercept/index.js +8 -8
- package/bin/website-plugins/intercept/oipage-vislite-intercept.js +55 -55
- package/bin/website-plugins/intercept/oipage-zipaper-intercept.js +36 -36
- package/bin/website-plugins/loader/index.js +11 -11
- package/bin/website-plugins/loader/oipage-html-loader.js +7 -7
- package/bin/website-plugins/loader/oipage-scss-loader.js +149 -149
- package/docs/config.md +106 -106
- package/package.json +42 -42
- package/src/index.js +29 -29
- package/types/serve.d.ts +83 -83
package/types/serve.d.ts
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
interface DevServerType {
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* 是否自动打开浏览器,默认false,true表示打开
|
|
6
|
-
*
|
|
7
|
-
* 也可以是一段地址,比如设置open=“docs/index.html”
|
|
8
|
-
*/
|
|
9
|
-
open?: boolean | string
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* 服务器端口号
|
|
13
|
-
*/
|
|
14
|
-
port: number
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* 服务器根路径
|
|
18
|
-
*/
|
|
19
|
-
baseUrl: string
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 是否开启304缓存,默认开启
|
|
23
|
-
*/
|
|
24
|
-
cache: boolean
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* 是否开启 gzip 压缩,默认不开启
|
|
28
|
-
*
|
|
29
|
-
* 开启后,对支持 gzip 的客户端请求,自动压缩可压缩类型的文本资源(如 HTML、CSS、JS、JSON、SVG 等)
|
|
30
|
-
*/
|
|
31
|
-
gzip?: boolean
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 是否开启应用市场,默认true表示开启
|
|
35
|
-
*/
|
|
36
|
-
website: boolean
|
|
37
|
-
|
|
38
|
-
intercept?: Array<InterceptType>
|
|
39
|
-
|
|
40
|
-
proxy?: {
|
|
41
|
-
[key: string]: {
|
|
42
|
-
target: string
|
|
43
|
-
pathRewrite?: {
|
|
44
|
-
[key: string]: string
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface InterceptType {
|
|
51
|
-
test: RegExp
|
|
52
|
-
handler(request: any, response: any): void
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
interface LoaderType {
|
|
56
|
-
(source: string): string
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
interface ConfigType {
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* 服务器名称
|
|
63
|
-
*/
|
|
64
|
-
name?: string
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* 服务器版本
|
|
68
|
-
*/
|
|
69
|
-
version?: string
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* 服务器运行配置
|
|
73
|
-
*/
|
|
74
|
-
devServer: DevServerType
|
|
75
|
-
|
|
76
|
-
module?: {
|
|
77
|
-
rules: Array<{
|
|
78
|
-
test: RegExp
|
|
79
|
-
use: LoaderType
|
|
80
|
-
}>
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
1
|
+
|
|
2
|
+
interface DevServerType {
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 是否自动打开浏览器,默认false,true表示打开
|
|
6
|
+
*
|
|
7
|
+
* 也可以是一段地址,比如设置open=“docs/index.html”
|
|
8
|
+
*/
|
|
9
|
+
open?: boolean | string
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 服务器端口号
|
|
13
|
+
*/
|
|
14
|
+
port: number
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 服务器根路径
|
|
18
|
+
*/
|
|
19
|
+
baseUrl: string
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 是否开启304缓存,默认开启
|
|
23
|
+
*/
|
|
24
|
+
cache: boolean
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 是否开启 gzip 压缩,默认不开启
|
|
28
|
+
*
|
|
29
|
+
* 开启后,对支持 gzip 的客户端请求,自动压缩可压缩类型的文本资源(如 HTML、CSS、JS、JSON、SVG 等)
|
|
30
|
+
*/
|
|
31
|
+
gzip?: boolean
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 是否开启应用市场,默认true表示开启
|
|
35
|
+
*/
|
|
36
|
+
website: boolean
|
|
37
|
+
|
|
38
|
+
intercept?: Array<InterceptType>
|
|
39
|
+
|
|
40
|
+
proxy?: {
|
|
41
|
+
[key: string]: {
|
|
42
|
+
target: string
|
|
43
|
+
pathRewrite?: {
|
|
44
|
+
[key: string]: string
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface InterceptType {
|
|
51
|
+
test: RegExp
|
|
52
|
+
handler(request: any, response: any): void
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface LoaderType {
|
|
56
|
+
(source: string): string
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface ConfigType {
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 服务器名称
|
|
63
|
+
*/
|
|
64
|
+
name?: string
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 服务器版本
|
|
68
|
+
*/
|
|
69
|
+
version?: string
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 服务器运行配置
|
|
73
|
+
*/
|
|
74
|
+
devServer: DevServerType
|
|
75
|
+
|
|
76
|
+
module?: {
|
|
77
|
+
rules: Array<{
|
|
78
|
+
test: RegExp
|
|
79
|
+
use: LoaderType
|
|
80
|
+
}>
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
84
|
export default function (config?: ConfigType): void
|