makeDep修正了强制模式
This commit is contained in:
parent
7202839d98
commit
1fe6f4409c
|
|
@ -56,6 +56,7 @@ commander_1.default
|
|||
.action(makeLocale_1.default);
|
||||
commander_1.default
|
||||
.command('make:dependency')
|
||||
.option('-r --rebuild', 'rebuild')
|
||||
.description('make dependency')
|
||||
.action(makeDependency_1.default);
|
||||
commander_1.default
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ const cross_spawn_1 = tslib_1.__importDefault(require("cross-spawn"));
|
|||
const path_1 = require("path");
|
||||
async function make(cmd) {
|
||||
(0, tip_style_1.Success)(`${(0, tip_style_1.success)(`make dependecy`)}`);
|
||||
const args = [(0, path_1.resolve)(__dirname, '../scripts/make-dependency.js'), 'true'];
|
||||
const rebuild = !!cmd.rebuild;
|
||||
const args = [(0, path_1.resolve)(__dirname, '../scripts/make-dependency.js'), `${rebuild}`];
|
||||
const result = cross_spawn_1.default.sync('node', args, {
|
||||
stdio: 'inherit',
|
||||
shell: true,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
const rebuild = process.argv[2];
|
||||
const rebuild = process.argv[2] === 'true';
|
||||
const startUpBuilder = require('oak-domain/lib/compiler/dependencyBuilder').default;
|
||||
startUpBuilder(!!rebuild);
|
||||
|
|
@ -11,7 +11,6 @@ import spawn from 'cross-spawn';
|
|||
import { resolve } from 'path';
|
||||
import makeLocale from './makeLocale';
|
||||
import makeRouter from './makeRouter';
|
||||
import makeDep from './makeDependency';
|
||||
import { copyFileSync } from 'fs';
|
||||
|
||||
type Mode = 'development' | 'staging' | 'production';
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ program
|
|||
|
||||
program
|
||||
.command('make:dependency')
|
||||
.option('-r --rebuild', 'rebuild')
|
||||
.description('make dependency')
|
||||
.action(makeDependency);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ import { resolve } from 'path';
|
|||
|
||||
export default async function make(cmd: any) {
|
||||
Success(`${success(`make dependecy`)}`);
|
||||
const args = [resolve(__dirname, '../scripts/make-dependency.js'), 'true'];
|
||||
const rebuild = !!cmd.rebuild;
|
||||
const args = [resolve(__dirname, '../scripts/make-dependency.js'), `${rebuild}`];
|
||||
|
||||
const result = spawn.sync(
|
||||
'node',
|
||||
|
|
|
|||
Loading…
Reference in New Issue