clwy-express-generator 5.0.13 → 5.1.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 +3 -3
- package/bin/express-cli.js +1 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
## 功能特性
|
|
10
10
|
|
|
11
|
-
- **🚀 ES6支持**:代码更现代简洁。
|
|
11
|
+
- **🚀 ES6 支持**:代码更现代简洁。
|
|
12
12
|
- **🔀 路由拆分**:独立文件,便于管理维护。
|
|
13
13
|
- **📁 中间件模块化**:新增文件夹存放中间件。
|
|
14
14
|
- **🔧 增加环境变量配置**:多环境管理更便捷。
|
|
15
|
-
- **🔄 集成nodemon**:开发时自动重启服务。
|
|
16
|
-
- **🌐 集成CORS**:允许跨域请求。
|
|
15
|
+
- **🔄 集成 nodemon**:开发时自动重启服务。
|
|
16
|
+
- **🌐 集成 CORS**:允许跨域请求。
|
|
17
17
|
- **📄 新增 README.md**:包含项目简介和基本功能说明。
|
|
18
18
|
- **📦 内置配置**:默认包含`.prettierrc`(代码格式化)和`.gitignore`(文件忽略)。
|
|
19
19
|
|
package/bin/express-cli.js
CHANGED
|
@@ -95,6 +95,7 @@ function createApplication (name, dir, options, done) {
|
|
|
95
95
|
name: name,
|
|
96
96
|
version: '0.0.0',
|
|
97
97
|
private: true,
|
|
98
|
+
type: options.es6 ? 'module' : 'commonjs',
|
|
98
99
|
scripts: {
|
|
99
100
|
start: 'nodemon ./bin/www',
|
|
100
101
|
format: 'prettier --write "**/*.{js,json,md}"'
|
|
@@ -110,9 +111,6 @@ function createApplication (name, dir, options, done) {
|
|
|
110
111
|
prettier: '^3.5.3'
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
if (options.es6) {
|
|
114
|
-
pkg.type = 'module'
|
|
115
|
-
}
|
|
116
114
|
|
|
117
115
|
// JavaScript
|
|
118
116
|
const app = loadTemplate(options.es6 ? 'mjs/app.js' : 'js/app.js')
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "clwy-express-generator",
|
|
3
3
|
"description": "Express' application generator",
|
|
4
4
|
"homepage": "https://github.com/clwy-cn/clwy-express-generator",
|
|
5
|
-
"version": "5.0
|
|
5
|
+
"version": "5.1.0",
|
|
6
6
|
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
|
7
7
|
"contributors": [
|
|
8
8
|
"Aaron Heckmann <aaron.heckmann+github@gmail.com>",
|