@eliumhq/elium-i18n
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "@eliumhq/elium-i18n", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=9", |
const { exec } = require('child_process') | ||
module.exports = (commit = true) => { | ||
function ensureArray (arr) { | ||
return Array.isArray(arr) ? arr : [arr] | ||
} | ||
module.exports = (languages, commit = true) => { | ||
console.log('Pulling PO files...') | ||
exec(`tx pull -a`, (error, stdout, stderr) => { | ||
const langs = languages | ||
? ensureArray(languages) | ||
.map(l => `-l ${l}`) | ||
.join(' ') | ||
: '-a ' | ||
exec(`tx pull ${langs}`, (error, stdout, stderr) => { | ||
if (error) { | ||
@@ -7,0 +16,0 @@ console.error(error) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54824
339