@jayfong/x-server 2.88.1 → 2.89.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/lib/_cjs/cli/build_util.js +3 -1
- package/lib/_cjs/cli/cli.js +15 -9
- package/lib/cli/build_util.d.ts +1 -0
- package/lib/cli/build_util.js +3 -1
- package/lib/cli/cli.js +15 -9
- package/package.json +1 -1
package/lib/_cjs/cli/cli.js
CHANGED
|
@@ -140,11 +140,10 @@ _yargs.default.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
140
140
|
describe: '是否压缩',
|
|
141
141
|
type: 'boolean',
|
|
142
142
|
default: true
|
|
143
|
-
}).positional('
|
|
144
|
-
|
|
145
|
-
describe: '是否不本地安装外部依赖',
|
|
143
|
+
}).positional('local-install', {
|
|
144
|
+
describe: '是否本地安装外部依赖',
|
|
146
145
|
type: 'boolean',
|
|
147
|
-
default:
|
|
146
|
+
default: true
|
|
148
147
|
}).positional('channel', {
|
|
149
148
|
alias: 'h',
|
|
150
149
|
describe: '渠道',
|
|
@@ -164,10 +163,16 @@ _yargs.default.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
164
163
|
describe: '构建时排除的文件',
|
|
165
164
|
type: 'string',
|
|
166
165
|
array: true
|
|
167
|
-
})
|
|
168
|
-
|
|
166
|
+
})
|
|
167
|
+
// 注意:不要加 no 前缀,其会自动处理
|
|
168
|
+
.positional('prisma-engine', {
|
|
169
|
+
describe: '是否包含 Prisma 引擎',
|
|
169
170
|
type: 'boolean',
|
|
170
|
-
default:
|
|
171
|
+
default: true
|
|
172
|
+
}).positional('empty-dist-dir', {
|
|
173
|
+
describe: '是否清空构建目录',
|
|
174
|
+
type: 'boolean',
|
|
175
|
+
default: true
|
|
171
176
|
}), async argv => {
|
|
172
177
|
await _env_util.EnvUtil.withChannel({
|
|
173
178
|
cwd: process.cwd(),
|
|
@@ -197,7 +202,7 @@ _yargs.default.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
197
202
|
external: externals,
|
|
198
203
|
inlineEnvs: envMap,
|
|
199
204
|
minify: argv.minify,
|
|
200
|
-
noInstall: argv['
|
|
205
|
+
noInstall: argv['local-install'] === false,
|
|
201
206
|
channel: channel,
|
|
202
207
|
excludeFiles: (argv.exclude ? (0, _vtils.castArray)(argv.exclude) : []).map(item => {
|
|
203
208
|
return _vtils.StringTemplate.render(item, envMap, {
|
|
@@ -207,7 +212,8 @@ _yargs.default.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
207
212
|
});
|
|
208
213
|
}),
|
|
209
214
|
prismaCliBinaryTargets: envMap.PRISMA_CLI_BINARY_TARGETS,
|
|
210
|
-
noPrismaEngine: argv['
|
|
215
|
+
noPrismaEngine: argv['prisma-engine'] === false,
|
|
216
|
+
noEmptyDistDir: argv['empty-dist-dir'] === false
|
|
211
217
|
});
|
|
212
218
|
console.log('构建成功');
|
|
213
219
|
if (argv.deploy) {
|
package/lib/cli/build_util.d.ts
CHANGED
package/lib/cli/build_util.js
CHANGED
package/lib/cli/cli.js
CHANGED
|
@@ -138,11 +138,10 @@ yargs.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
138
138
|
describe: '是否压缩',
|
|
139
139
|
type: 'boolean',
|
|
140
140
|
default: true
|
|
141
|
-
}).positional('
|
|
142
|
-
|
|
143
|
-
describe: '是否不本地安装外部依赖',
|
|
141
|
+
}).positional('local-install', {
|
|
142
|
+
describe: '是否本地安装外部依赖',
|
|
144
143
|
type: 'boolean',
|
|
145
|
-
default:
|
|
144
|
+
default: true
|
|
146
145
|
}).positional('channel', {
|
|
147
146
|
alias: 'h',
|
|
148
147
|
describe: '渠道',
|
|
@@ -162,10 +161,16 @@ yargs.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
162
161
|
describe: '构建时排除的文件',
|
|
163
162
|
type: 'string',
|
|
164
163
|
array: true
|
|
165
|
-
})
|
|
166
|
-
|
|
164
|
+
})
|
|
165
|
+
// 注意:不要加 no 前缀,其会自动处理
|
|
166
|
+
.positional('prisma-engine', {
|
|
167
|
+
describe: '是否包含 Prisma 引擎',
|
|
167
168
|
type: 'boolean',
|
|
168
|
-
default:
|
|
169
|
+
default: true
|
|
170
|
+
}).positional('empty-dist-dir', {
|
|
171
|
+
describe: '是否清空构建目录',
|
|
172
|
+
type: 'boolean',
|
|
173
|
+
default: true
|
|
169
174
|
}), async argv => {
|
|
170
175
|
await EnvUtil.withChannel({
|
|
171
176
|
cwd: process.cwd(),
|
|
@@ -195,7 +200,7 @@ yargs.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
195
200
|
external: externals,
|
|
196
201
|
inlineEnvs: envMap,
|
|
197
202
|
minify: argv.minify,
|
|
198
|
-
noInstall: argv['
|
|
203
|
+
noInstall: argv['local-install'] === false,
|
|
199
204
|
channel: channel,
|
|
200
205
|
excludeFiles: (argv.exclude ? castArray(argv.exclude) : []).map(item => {
|
|
201
206
|
return StringTemplate.render(item, envMap, {
|
|
@@ -205,7 +210,8 @@ yargs.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
205
210
|
});
|
|
206
211
|
}),
|
|
207
212
|
prismaCliBinaryTargets: envMap.PRISMA_CLI_BINARY_TARGETS,
|
|
208
|
-
noPrismaEngine: argv['
|
|
213
|
+
noPrismaEngine: argv['prisma-engine'] === false,
|
|
214
|
+
noEmptyDistDir: argv['empty-dist-dir'] === false
|
|
209
215
|
});
|
|
210
216
|
console.log('构建成功');
|
|
211
217
|
if (argv.deploy) {
|