Skip to content

Commit

Permalink
Workspace: Make build-translation-templates a toplevel command
Browse files Browse the repository at this point in the history
  • Loading branch information
personalizedrefrigerator committed Sep 21, 2023
1 parent fc7aecb commit aeab495
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"linter-precommit": "eslint --fix --ext .js --ext .ts",
"lint-staged": "lint-staged",
"lint-ci": "eslint . --max-warnings=0 --ext .js --ext .ts",
"build-translation-templates": "lerna run build-translation-templates",
"preinstall": "git config core.hookspath .githooks",
"postinstall": "npm run build"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/build-tool/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import buildTranslationTemplates from './buildTranslationTemplates';
import { BuildConfig, BuildMode, BundledFileRecord, TranslationSourcePair } from './types';
import compileSCSS from './compileSCSS';

type BuildCommand = BuildMode|'build-translation-template';
type BuildCommand = BuildMode|'build-translation-templates';

// TODO: These currently assume that build-tool is private to js-draw.
const scriptDir = realpathSync(path.resolve(__dirname));
Expand All @@ -20,7 +20,7 @@ const isBuildMode = (a: string): a is BuildMode => {
};

const isBuildCommand = (a: string): a is BuildCommand => {
return isBuildMode(a) || a === 'build-translation-template';
return isBuildMode(a) || a === 'build-translation-templates';
};

const printUsage = () => {
Expand Down Expand Up @@ -217,7 +217,7 @@ const main = async () => {
console.log('Done.');
}

if (buildMode === 'build-translation-template') {
if (buildMode === 'build-translation-templates') {
console.log('Building translation templates...');
buildTranslationTemplates(config);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/js-draw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"dist": "npm run build && npm run dist-test",
"build": "rm -rf ./dist/* && mkdir -p dist && build-tool build",
"watch": "rm -rf ./dist/* && mkdir -p dist && build-tool watch",
"build-translation-template": "build-tool build-translation-template",
"build-translation-templates": "build-tool build-translation-templates",
"prepack": "npm run dist && cd ../../ && npm run test && cd packages/js-draw && ts-node tools/copyREADME.ts copy",
"postpack": "ts-node tools/copyREADME.ts revert"
},
Expand Down

0 comments on commit aeab495

Please sign in to comment.