diff --git a/dist/check-i18n-variables b/dist/check-i18n-variables index edfb13a..c2f8e97 100755 --- a/dist/check-i18n-variables +++ b/dist/check-i18n-variables @@ -16,9 +16,15 @@ const { } = require('./translation-extraction.js') const {getFiles, filterJsFiles, supportedLngs} = require('./helpers.js') -const projects = process.argv.slice(2) +const [_nodeBin, _scriptPath, ...projects] = process.argv -console.log(projects) +if (projects.length < 1) { + console.log('Usage: check-i18n-variables ') + return +} + +// TODO: Pass in via ENV? +const ns = ['school', 'student', 'console', 'classroom', 'common'] const translationKeysWithKnownVariablesInProject = async project => { const files = await getFiles(project) diff --git a/dist/check-i18n-variables.js b/dist/check-i18n-variables.js old mode 100755 new mode 100644 diff --git a/dist/check-i18next-icu-parser.js b/dist/check-i18next-icu-parser.js old mode 100755 new mode 100644 diff --git a/dist/check-missing-translations.js b/dist/check-missing-translations.js old mode 100755 new mode 100644 diff --git a/dist/helpers.js b/dist/helpers.js index f0982c5..8a3a46a 100644 --- a/dist/helpers.js +++ b/dist/helpers.js @@ -29,19 +29,6 @@ const filterJsFiles = f => module.exports.filterJsFiles = filterJsFiles -const projects = [ - 'core', - 'student-materials', - 'educator-materials', - 'entities', - 'school', - 'student', - 'console', - 'classroom' -] - -module.exports.projects = projects - const supportedLngs = ['es', 'en', 'en-GB'] module.exports.supportedLngs = supportedLngs diff --git a/src/check-i18n-variables b/src/check-i18n-variables index 14de2ff..c2f8e97 100755 --- a/src/check-i18n-variables +++ b/src/check-i18n-variables @@ -16,7 +16,15 @@ const { } = require('./translation-extraction.js') const {getFiles, filterJsFiles, supportedLngs} = require('./helpers.js') -const projects = process.argv.slice(2) +const [_nodeBin, _scriptPath, ...projects] = process.argv + +if (projects.length < 1) { + console.log('Usage: check-i18n-variables ') + return +} + +// TODO: Pass in via ENV? +const ns = ['school', 'student', 'console', 'classroom', 'common'] const translationKeysWithKnownVariablesInProject = async project => { const files = await getFiles(project)