使用path的resolve
This commit is contained in:
parent
c1639a6752
commit
4aae866a6a
|
|
@ -52,7 +52,7 @@ async function build(cmd) {
|
||||||
!!cmd.memoryLimit && `MEMORY_LIMIT=${cmd.memoryLimit}`,
|
!!cmd.memoryLimit && `MEMORY_LIMIT=${cmd.memoryLimit}`,
|
||||||
`node`,
|
`node`,
|
||||||
cmd.memoryLimit && `--max_old_space_size=${cmd.memoryLimit}`,
|
cmd.memoryLimit && `--max_old_space_size=${cmd.memoryLimit}`,
|
||||||
(0, path_1.resolve)(`../scripts/${mpFileMap[mode]}`),
|
(0, path_1.resolve)(__dirname, `../scripts/${mpFileMap[mode]}`),
|
||||||
].filter(Boolean), {
|
].filter(Boolean), {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
shell: true,
|
shell: true,
|
||||||
|
|
@ -81,7 +81,7 @@ async function build(cmd) {
|
||||||
!!cmd.memoryLimit && `MEMORY_LIMIT=${cmd.memoryLimit}`,
|
!!cmd.memoryLimit && `MEMORY_LIMIT=${cmd.memoryLimit}`,
|
||||||
`node`,
|
`node`,
|
||||||
cmd.memoryLimit && `--max_old_space_size=${cmd.memoryLimit}`,
|
cmd.memoryLimit && `--max_old_space_size=${cmd.memoryLimit}`,
|
||||||
(0, path_1.resolve)(`../scripts/${webFileMap[mode]}`),
|
(0, path_1.resolve)(__dirname, `../scripts/${webFileMap[mode]}`),
|
||||||
].filter(Boolean), {
|
].filter(Boolean), {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
shell: true,
|
shell: true,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ const path_1 = require("path");
|
||||||
async function make() {
|
async function make() {
|
||||||
(0, tip_style_1.Success)(`${(0, tip_style_1.success)(`make oak-app-domain`)}`);
|
(0, tip_style_1.Success)(`${(0, tip_style_1.success)(`make oak-app-domain`)}`);
|
||||||
// ts-node scripts/build-app-domain & npm link ./app-domain
|
// ts-node scripts/build-app-domain & npm link ./app-domain
|
||||||
const result = cross_spawn_1.default.sync('ts-node', [(0, path_1.resolve)(__dirname, '../scripts/' + 'make-app-domain.js')], {
|
const result = cross_spawn_1.default.sync('ts-node', [(0, path_1.resolve)(__dirname, '../scripts/make-app-domain.js')], {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
shell: true,
|
shell: true,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ const path_1 = require("path");
|
||||||
async function make(cmd, watch) {
|
async function make(cmd, watch) {
|
||||||
(0, tip_style_1.Success)(`${(0, tip_style_1.success)(`make locales`)}`);
|
(0, tip_style_1.Success)(`${(0, tip_style_1.success)(`make locales`)}`);
|
||||||
// ts-node scripts/build-app-domain & npm link ./app-domain
|
// ts-node scripts/build-app-domain & npm link ./app-domain
|
||||||
const args = [(0, path_1.resolve)(__dirname, '../scripts/' + 'make-locale.js')];
|
const args = [(0, path_1.resolve)(__dirname, '../scripts/make-locale.js')];
|
||||||
if (watch) {
|
if (watch) {
|
||||||
args.push('true');
|
args.push('true');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ const path_1 = require("path");
|
||||||
async function make(cmd, watch) {
|
async function make(cmd, watch) {
|
||||||
(0, tip_style_1.Success)(`${(0, tip_style_1.success)(`make router`)}`);
|
(0, tip_style_1.Success)(`${(0, tip_style_1.success)(`make router`)}`);
|
||||||
// node scripts/make-router.js subdir watch
|
// node scripts/make-router.js subdir watch
|
||||||
const args = [(0, path_1.resolve)(__dirname, '../scripts/' + 'make-router.js'), cmd.subdir];
|
const args = [(0, path_1.resolve)(__dirname, '../scripts/make-router.js'), cmd.subdir];
|
||||||
if (watch) {
|
if (watch) {
|
||||||
args.push('true');
|
args.push('true');
|
||||||
const result = (0, cross_spawn_1.default)('node', args, {
|
const result = (0, cross_spawn_1.default)('node', args, {
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ export default async function build(cmd: any) {
|
||||||
!!cmd.memoryLimit && `MEMORY_LIMIT=${cmd.memoryLimit}`,
|
!!cmd.memoryLimit && `MEMORY_LIMIT=${cmd.memoryLimit}`,
|
||||||
`node`,
|
`node`,
|
||||||
cmd.memoryLimit && `--max_old_space_size=${cmd.memoryLimit}`,
|
cmd.memoryLimit && `--max_old_space_size=${cmd.memoryLimit}`,
|
||||||
resolve(`../scripts/${mpFileMap[mode]}`),
|
resolve(__dirname, `../scripts/${mpFileMap[mode]}`),
|
||||||
].filter(Boolean),
|
].filter(Boolean),
|
||||||
{
|
{
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
|
|
@ -106,7 +106,7 @@ export default async function build(cmd: any) {
|
||||||
!!cmd.memoryLimit && `MEMORY_LIMIT=${cmd.memoryLimit}`,
|
!!cmd.memoryLimit && `MEMORY_LIMIT=${cmd.memoryLimit}`,
|
||||||
`node`,
|
`node`,
|
||||||
cmd.memoryLimit && `--max_old_space_size=${cmd.memoryLimit}`,
|
cmd.memoryLimit && `--max_old_space_size=${cmd.memoryLimit}`,
|
||||||
resolve(`../scripts/${webFileMap[mode]}`),
|
resolve(__dirname, `../scripts/${webFileMap[mode]}`),
|
||||||
].filter(Boolean),
|
].filter(Boolean),
|
||||||
{
|
{
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ export default async function make() {
|
||||||
// ts-node scripts/build-app-domain & npm link ./app-domain
|
// ts-node scripts/build-app-domain & npm link ./app-domain
|
||||||
const result = spawn.sync(
|
const result = spawn.sync(
|
||||||
'ts-node',
|
'ts-node',
|
||||||
[resolve(__dirname, '../scripts/' + 'make-app-domain.js')],
|
[resolve(__dirname, '../scripts/make-app-domain.js')],
|
||||||
{
|
{
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
shell: true,
|
shell: true,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import { resolve } from 'path';
|
||||||
export default async function make(cmd: any, watch?: boolean) {
|
export default async function make(cmd: any, watch?: boolean) {
|
||||||
Success(`${success(`make locales`)}`);
|
Success(`${success(`make locales`)}`);
|
||||||
// ts-node scripts/build-app-domain & npm link ./app-domain
|
// ts-node scripts/build-app-domain & npm link ./app-domain
|
||||||
const args = [resolve(__dirname, '../scripts/' + 'make-locale.js')];
|
const args = [resolve(__dirname, '../scripts/make-locale.js')];
|
||||||
if (watch) {
|
if (watch) {
|
||||||
args.push('true');
|
args.push('true');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import { resolve } from 'path';
|
||||||
export default async function make(cmd: any, watch?: boolean) {
|
export default async function make(cmd: any, watch?: boolean) {
|
||||||
Success(`${success(`make router`)}`);
|
Success(`${success(`make router`)}`);
|
||||||
// node scripts/make-router.js subdir watch
|
// node scripts/make-router.js subdir watch
|
||||||
const args = [resolve(__dirname, '../scripts/' + 'make-router.js'), cmd.subdir];
|
const args = [resolve(__dirname, '../scripts/make-router.js'), cmd.subdir];
|
||||||
if (watch) {
|
if (watch) {
|
||||||
args.push('true');
|
args.push('true');
|
||||||
const result = spawn(
|
const result = spawn(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue