@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.
Files changed (74) hide show
  1. package/.github/FUNDING.yml +11 -11
  2. package/AUTHORS.txt +6 -6
  3. package/CHANGELOG +47 -47
  4. package/LICENSE +20 -20
  5. package/README.md +132 -132
  6. package/bin/WebSocket/decodeWsFrame.js +43 -43
  7. package/bin/WebSocket/encodeWsFrame.js +28 -28
  8. package/bin/WebSocket/headersToJSON.js +26 -26
  9. package/bin/WebSocket/index.js +106 -106
  10. package/bin/data/mineTypes.json +104 -104
  11. package/bin/disk.js +42 -42
  12. package/bin/help.js +55 -55
  13. package/bin/intercept.js +15 -15
  14. package/bin/network.js +21 -21
  15. package/bin/notebook/index.js +8 -8
  16. package/bin/proxy.js +82 -82
  17. package/bin/run +146 -146
  18. package/bin/serve.js +318 -318
  19. package/bin/template/404.html +184 -184
  20. package/bin/tools/deleteEmptyFolder.js +33 -33
  21. package/bin/tools/format.js +75 -75
  22. package/bin/tools/isBinary.js +83 -83
  23. package/bin/tools/network.js +42 -42
  24. package/bin/tools/openBrowser.js +34 -34
  25. package/bin/tools/resolve404.js +98 -98
  26. package/bin/tools/resolveImport.js +96 -96
  27. package/bin/website-htmls/components/ui-select-file/index.html +8 -8
  28. package/bin/website-htmls/components/ui-select-file/index.js +42 -42
  29. package/bin/website-htmls/components/ui-select-file/index.scss +44 -44
  30. package/bin/website-htmls/dialogs/imageSize/index.html +54 -54
  31. package/bin/website-htmls/dialogs/imageSize/index.js +53 -53
  32. package/bin/website-htmls/dialogs/imageSize/index.scss +140 -140
  33. package/bin/website-htmls/dialogs/index.js +52 -52
  34. package/bin/website-htmls/images/addFile.svg +1 -1
  35. package/bin/website-htmls/images/img-to-pdf.svg +1 -1
  36. package/bin/website-htmls/index.html +17 -17
  37. package/bin/website-htmls/main.js +13 -13
  38. package/bin/website-htmls/pages/App/index.html +6 -6
  39. package/bin/website-htmls/pages/App/index.js +22 -22
  40. package/bin/website-htmls/pages/App/index.scss +43 -43
  41. package/bin/website-htmls/pages/appStore/index.html +7 -7
  42. package/bin/website-htmls/pages/appStore/index.js +19 -19
  43. package/bin/website-htmls/pages/appStore/index.scss +54 -54
  44. package/bin/website-htmls/pages/chart/index.html +8 -8
  45. package/bin/website-htmls/pages/chart/index.js +72 -72
  46. package/bin/website-htmls/pages/chart/index.scss +71 -71
  47. package/bin/website-htmls/pages/home/index.html +19 -19
  48. package/bin/website-htmls/pages/home/index.js +19 -19
  49. package/bin/website-htmls/pages/home/index.scss +87 -87
  50. package/bin/website-htmls/pages/image-editor/index.html +27 -27
  51. package/bin/website-htmls/pages/image-editor/index.js +106 -106
  52. package/bin/website-htmls/pages/image-editor/index.scss +69 -69
  53. package/bin/website-htmls/pages/img-to-pdf/index.html +3 -3
  54. package/bin/website-htmls/pages/img-to-pdf/index.js +44 -44
  55. package/bin/website-htmls/pages/img-to-pdf/index.scss +9 -9
  56. package/bin/website-htmls/pages/recorder-screen/index.html +15 -15
  57. package/bin/website-htmls/pages/recorder-screen/index.js +227 -227
  58. package/bin/website-htmls/pages/recorder-screen/index.scss +52 -52
  59. package/bin/website-htmls/router.config.js +29 -29
  60. package/bin/website-htmls/styles/common.css +44 -44
  61. package/bin/website-htmls/styles/normalize.css +94 -94
  62. package/bin/website-plugins/intercept/chart.js +33 -33
  63. package/bin/website-plugins/intercept/getPackage.js +17 -17
  64. package/bin/website-plugins/intercept/head.js +8 -8
  65. package/bin/website-plugins/intercept/index.js +8 -8
  66. package/bin/website-plugins/intercept/oipage-vislite-intercept.js +55 -55
  67. package/bin/website-plugins/intercept/oipage-zipaper-intercept.js +36 -36
  68. package/bin/website-plugins/loader/index.js +11 -11
  69. package/bin/website-plugins/loader/oipage-html-loader.js +7 -7
  70. package/bin/website-plugins/loader/oipage-scss-loader.js +149 -149
  71. package/docs/config.md +106 -106
  72. package/package.json +42 -42
  73. package/src/index.js +29 -29
  74. 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