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