efront 4.5.18 → 4.6.1
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/#/345/233/275/351/231/205/345/214/226.yml +21 -0
- package/coms/compile/audit.js +64 -0
- package/coms/compile/audit_test.js +2 -0
- package/coms/compile/unstruct.js +22 -21
- package/coms/compile/unstruct_test.js +8 -4
- package/coms/docs/codecolor.js +94 -0
- package/coms/docs/codetext.xht +9 -99
- package/coms/docs/helps.js +2 -1
- package/coms/reptile/colors.js +29 -0
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/readme-en.md +2 -2
- package/readme.md +19 -19
package/readme-en.md
CHANGED
|
@@ -70,7 +70,7 @@ set app=PROJECT_NAME
|
|
|
70
70
|
set public_path=PUBLIC_PATH
|
|
71
71
|
efront public
|
|
72
72
|
```
|
|
73
|
-
`PUBLIC_PATH` is the publishing path
|
|
73
|
+
`PUBLIC_PATH` is the publishing path,defaults to the folder named 'public' in current working directory.
|
|
74
74
|
|
|
75
75
|
* If you want to publish on the server, it is not recommended to use a method that ends in `.html` and write the asynchronously loaded code to a separate file
|
|
76
76
|
|
|
@@ -89,7 +89,7 @@ set app=PROJECT_NAME.js
|
|
|
89
89
|
* The current version of efront provides incomplete support for the `require` syntax in commonjs and the `import` syntax in es6 (asynchronous ring calls are not supported). For relevant projects that meet the requirements, they can be compiled and published.
|
|
90
90
|
* If you want to publish a component with the require syntax and want to merge the component and all dependencies for output, you can replace the `efront public` above with `efront publish`
|
|
91
91
|
|
|
92
|
-
* If automatic path recognition is required, directories such as `public` / `dist` / `output` / `release` may be recognized as target paths, and files in these paths may be overwritten. If it is confirmed to be feasible, use `efront build`
|
|
92
|
+
* If automatic path recognition is required, directories such as `public` / `dist` / `output` / `release` may be recognized as target paths, and files in these paths may be overwritten. If it is confirmed to be feasible, use `efront build` or `efront release`
|
|
93
93
|
|
|
94
94
|
## 5. Watch mode
|
|
95
95
|
|
package/readme.md
CHANGED
|
@@ -68,7 +68,7 @@ set public_path=PUBLIC_PATH
|
|
|
68
68
|
efront public
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
其中`PUBLIC_PATH
|
|
71
|
+
其中`PUBLIC_PATH`为发布路径,`PUBLIC_PATH`的默认值是当前目录的`public`文件夹
|
|
72
72
|
|
|
73
73
|
* 如果是要发布在服务器上,不建议使用以`.html`结尾的方式发布,将异步加载的代码写入独立的文件
|
|
74
74
|
|
|
@@ -87,7 +87,7 @@ set app=PROJECT_NAME.js
|
|
|
87
87
|
* 目前版本的efront提供对 commonjs中的require语法和es6中的import语法 的不完全支持(不支持异步环形调用),对于符合要求的相关项目,可以进行编译发布。
|
|
88
88
|
* 如果要发布含有require语法的组件,并希望将组件及所有依赖项合并输出,那么可以将上面的`efront public`替换为`efront publish`
|
|
89
89
|
|
|
90
|
-
* 如果需要自动识别路径,类似`public`/`dist`/`output`/`release`的目录都可能被识别为目标路径,这些路径中的文件可能被覆盖,如果确认可行,可以使用`efront build`
|
|
90
|
+
* 如果需要自动识别路径,类似`public`/`dist`/`output`/`release`的目录都可能被识别为目标路径,这些路径中的文件可能被覆盖,如果确认可行,可以使用`efront build`或`efront release`
|
|
91
91
|
|
|
92
92
|
## 5.Watch模式
|
|
93
93
|
|
|
@@ -109,23 +109,23 @@ efront 默认读取当前路径下的`_envs/`和用户目录的`.efront/_envs/`
|
|
|
109
109
|
```bat
|
|
110
110
|
efront watch --APP=kugou --PUBLIC_PATH=... --PAGE_PATH=...
|
|
111
111
|
```
|
|
112
|
-
| 配置项
|
|
113
|
-
|
|
|
114
|
-
| `APP`
|
|
115
|
-
| `PAGE_PATH`
|
|
116
|
-
| `COMM_PATH`
|
|
117
|
-
| `PUBLIC_PATH`
|
|
118
|
-
| `PUBLIC_EXTT`
|
|
119
|
-
| `PAGE`
|
|
120
|
-
| `COMM`
|
|
121
|
-
| `PREFIX`
|
|
122
|
-
| `NOPROXY`
|
|
123
|
-
| `DIRECT`
|
|
124
|
-
| `ENTRY_NAME`
|
|
125
|
-
| `EXTRACT`
|
|
126
|
-
| `UPLEVEL`
|
|
127
|
-
| `MSIE`
|
|
128
|
-
| `AUTOEVAL`
|
|
112
|
+
| 配置项 | 说明 |
|
|
113
|
+
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
114
|
+
| `APP` | 应用名,影响最终生成应用的路径和默认的源文件路径 |
|
|
115
|
+
| `PAGE_PATH` | 页面文件所存放的根路径,默认为`./apps` |
|
|
116
|
+
| `COMM_PATH` | 组件文件所存放的根路径,如果存在多个,可以用 `,` 分割,可以使用 `:` 指定为`efront`所提供的组件的路径,默认为`./coms` |
|
|
117
|
+
| `PUBLIC_PATH` | 发布的目标根路径,最终生成的代码路径为`PUBLIC_PATH\APP`,如果此项被指定为`PAGE_PATH`,efront将禁用发布功能,在执行`efront start`后,可以通过浏览器访问压缩版本的代码 |
|
|
118
|
+
| `PUBLIC_EXTT` | 发布的逻辑代码的扩展名,默认`.js`或`.txt` |
|
|
119
|
+
| `PAGE` | 页面文件存放的路径,默认为应用名`APP` |
|
|
120
|
+
| `COMM` | 组件文件存放的路径,默认为应用名加efront默认组件库`APP,zimoli` |
|
|
121
|
+
| `PREFIX` | 发布时指定组件className前缀,默认无前缀 |
|
|
122
|
+
| `NOPROXY` | 传统代理,默认在开发环境开启传统代理,在生产环境禁用传统代理 |
|
|
123
|
+
| `DIRECT` | 如果是用`pathname`作为单页应用的页面路径,可以配置此参数,以使空路都指向该参数所指定的路径。如果配置为数值,则自动截取用户路径的前几级,如果指定为字符串,则所有空路径都返回该字符串路径下的内容。 |
|
|
124
|
+
| `ENTRY_NAME` | efront默认依次查找文件中声明的`main`,`Main`,`MAIN`,`<文件名>`做为导出对象(入口),用户可配置此环境变量以进行修改 |
|
|
125
|
+
| `EXTRACT` | 如果项目有多个入口,efront默认将主程序写入独立的文件,如果项目是单入口,efront默认将主程序并入index.html,如果您的代码有特殊要求,可以配置引此参数指定efront的行为 |
|
|
126
|
+
| `UPLEVEL` | 如果您的代码发布时不需要降级,可添加此参数,以提高编译速度 |
|
|
127
|
+
| `MSIE` | 用`efront live --msie`启动服务器,可对`ie`系列浏览器进行代码适配,以便在`ie`上动态调试 |
|
|
128
|
+
| `AUTOEVAL` | 自动常量化的开关,在打包目标代码时默认开启,在开发环境默认关闭,可以指定参数`--no-autoeval`或`--autoeval`修改`efront`的默认行为 |
|
|
129
129
|
|
|
130
130
|
# 功能选项
|
|
131
131
|
|