Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/base/package-scripts.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const scripts = {
json: `node "${LIB}/i18n/toJSON.js" src/i18n dist/generated/assets/i18n`,
},
jsonImports: {
default: "mkdirp src/generated/json-imports && nps build.jsonImports.i18n",
i18n: `node "${LIB}/generate-json-imports/i18n.js" dist/generated/assets/i18n src/generated/json-imports`,
default: "nps build.jsonImports.i18n",
i18n: `node "${LIB}/generate-json-imports/i18n.js" src/i18n src/generated/json-imports`,
},
},
copy: {
Expand Down
19 changes: 8 additions & 11 deletions packages/tools/components-package/nps.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const cypressEnvVariables = (options, predefinedVars) => {
let variables = [];
const { cypress_code_coverage, cypress_acc_tests } = options.internal ?? {};

// Handle environment variables like TEST_SUITE
// Handle environment variables like TEST_SUITE
if (predefinedVars) {
variables = [...predefinedVars];
}
Expand Down Expand Up @@ -83,11 +83,11 @@ const getScripts = (options) => {
lintfix: `eslint . ${eslintConfig} --fix`,
generate: {
default: `${tsCrossEnv} nps prepare.all`,
all: 'concurrently "nps build.templates" "nps build.i18n" "nps prepare.styleRelated" "nps copyProps" "nps build.illustrations"',
all: 'concurrently "nps build.templates" "nps build.i18n" "nps prepare.styleRelated" "nps build.illustrations"',
styleRelated: "nps build.styles build.jsonImports build.jsImports",
},
prepare: {
default: `${tsCrossEnv} nps clean prepare.all ${options.legacy ? "copy" : ""} copyProps prepare.typescript generateAPI`,
default: `${tsCrossEnv} nps clean prepare.all ${options.legacy ? "copy" : ""} prepare.typescript generateAPI`,
all: 'concurrently "nps build.templates" "nps build.i18n" "nps prepare.styleRelated" "nps build.illustrations"',
styleRelated: "nps build.styles build.jsonImports build.jsImports",
typescript: tsCommandOld,
Expand All @@ -108,7 +108,7 @@ const getScripts = (options) => {
jsonImports: {
default: "mkdirp src/generated/json-imports && nps build.jsonImports.themes build.jsonImports.i18n",
themes: `node "${LIB}/generate-json-imports/themes.js" dist/generated/assets/themes src/generated/json-imports`,
i18n: `node "${LIB}/generate-json-imports/i18n.js" dist/generated/assets/i18n src/generated/json-imports`,
i18n: `node "${LIB}/generate-json-imports/i18n.js" src/i18n src/generated/json-imports`,
},
jsImports: {
default: "mkdirp src/generated/js-imports && nps build.jsImports.illustrationsLoaders",
Expand All @@ -118,18 +118,15 @@ const getScripts = (options) => {
bundle2: ``,
illustrations: createIllustrationsJSImportsScript,
},
copyProps: `node "${LIB}/copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/`,
copy: {
default: "nps copy.src copy.props",
src: `node "${LIB}/copy-and-watch/index.js" --silent "src/**/*.{js,json}" dist/`,
props: `node "${LIB}/copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/`,
default: "nps copy.src",
src: `node "${LIB}/copy-and-watch/index.js" "src/**/*.{js,json}" dist/`,
},
watch: {
default: `${tsCrossEnv} concurrently "nps watch.templates" "nps watch.typescript" ${options.legacy ? '"nps watch.src"' : ""} "nps watch.styles" "nps watch.i18n" "nps watch.props"`,
default: `${tsCrossEnv} concurrently "nps watch.templates" "nps watch.typescript" ${options.legacy ? '"nps watch.src"' : ""} "nps watch.styles" "nps watch.i18n"`,
devServer: 'concurrently "nps watch.default" "nps watch.bundle"',
src: 'nps "copy.src --watch --safe --skip-initial-copy"',
typescript: tsWatchCommandStandalone,
props: 'nps "copyProps --watch --safe --skip-initial-copy"',
bundle: `node ${LIB}/dev-server/dev-server.mjs ${viteConfig}`,
styles: {
default: 'concurrently "nps watch.styles.themes" "nps watch.styles.components"',
Expand Down Expand Up @@ -158,7 +155,7 @@ const getScripts = (options) => {
replace: `node "${LIB}/scoping/scope-test-pages.js" test/pages/scoped demo`,
},
watchWithBundle: 'concurrently "nps scope.watch" "nps scope.bundle" ',
watch: 'concurrently "nps watch.templates" "nps watch.props" "nps watch.styles"',
watch: 'concurrently "nps watch.templates" "nps watch.styles"',
bundle: `node ${LIB}/dev-server/dev-server.mjs ${viteConfig}`,
},
generateAPI: {
Expand Down
8 changes: 4 additions & 4 deletions packages/tools/icons-collection/nps.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ const getScripts = (options) => {
default: `${tsCrossEnv} nps clean copy build.i18n typescript build.icons build.jsonImports`,
i18n: {
default: "nps build.i18n.defaultsjs build.i18n.json",
defaultsjs: `mkdirp dist/generated/i18n && node "${LIB}/i18n/defaults.js" src/i18n src/generated/i18n`,
json: `mkdirp src/generated/assets/i18n && node "${LIB}/i18n/toJSON.js" src/i18n src/generated/assets/i18n`,
defaultsjs: `node "${LIB}/i18n/defaults.js" src/i18n src/generated/i18n`,
json: `node "${LIB}/i18n/toJSON.js" src/i18n src/generated/assets/i18n`,
},
jsonImports: {
default: "mkdirp src/generated/json-imports && nps build.jsonImports.i18n",
i18n: `node "${LIB}/generate-json-imports/i18n.js" src/generated/assets/i18n src/generated/json-imports`,
default: "nps build.jsonImports.i18n",
i18n: `node "${LIB}/generate-json-imports/i18n.js" src/i18n src/generated/json-imports`,
},
icons: createJSImportsCmd,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/lib/generate-json-imports/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const generate = async () => {
// All languages present in the file system
const files = await fs.readdir(inputFolder);
const languages = files.map(file => {
const matches = file.match(/messagebundle_(.+?).json$/);
const matches = file.match(/messagebundle_(.+?).properties$/);
return matches ? matches[1] : undefined;
}).filter(key => !!key);

Expand Down
Loading