make:locales的参数问题

This commit is contained in:
Xu Chang 2023-08-15 20:38:47 +08:00
parent c48cd58de3
commit abff6336ab
6 changed files with 6 additions and 5 deletions

View File

@ -10,7 +10,7 @@ async function build(cmd) {
return;
}
// 先makeLocale
(0, makeLocale_1.default)();
(0, makeLocale_1.default)('', true);
//ts类型检查 waring 还是error,
//主要web受影响error级别的话 控制台和网页都报错warning级别的话 控制台报错
const TSC_COMPILE_ON_ERROR = cmd.check !== 'error';

2
lib/makeLocale.d.ts vendored
View File

@ -1 +1 @@
export default function make(watch?: boolean): Promise<void>;
export default function make(cmd: any, watch?: boolean): Promise<void>;

View File

@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const tip_style_1 = require("./tip-style");
const cross_spawn_1 = tslib_1.__importDefault(require("cross-spawn"));
async function make(watch) {
async function make(cmd, watch) {
(0, tip_style_1.Success)(`${(0, tip_style_1.success)(`make locales`)}`);
// ts-node scripts/build-app-domain & npm link ./app-domain
const args = [require.resolve('../scripts/' + 'make-locale.js')];

View File

@ -1,4 +1,5 @@
const watch = process.argv[2];
const LocaleBuilder = require('oak-domain/lib/compiler/localeBuilder').default;
const builder = new LocaleBuilder(false);
builder.build(!!watch);

View File

@ -20,7 +20,7 @@ export default async function build(cmd: any) {
return;
}
// 先makeLocale
makeLocale();
makeLocale('', true);
//ts类型检查 waring 还是error,
//主要web受影响error级别的话 控制台和网页都报错warning级别的话 控制台报错
const TSC_COMPILE_ON_ERROR = cmd.check !== 'error';

View File

@ -9,7 +9,7 @@ import {
} from './tip-style';
import spawn from 'cross-spawn';
export default async function make(watch?: boolean) {
export default async function make(cmd: any, watch?: boolean) {
Success(`${success(`make locales`)}`);
// ts-node scripts/build-app-domain & npm link ./app-domain
const args = [require.resolve('../scripts/' + 'make-locale.js')];