i18next-scanner
Advanced tools
Comparing version 2.4.3 to 2.4.4
@@ -6,5 +6,6 @@ #!/usr/bin/env node | ||
var program = require('commander'); | ||
var ensureArray = require('ensure-array'); | ||
var sort = require('gulp-sort'); | ||
var vfs = require('vinyl-fs'); | ||
var scanner = require('../lib'); | ||
var vfs = require('vinyl-fs'); | ||
var sort = require('gulp-sort'); | ||
var pkg = require('../package.json'); | ||
@@ -23,4 +24,4 @@ | ||
console.log(' $ i18next-scanner --config i18next-scanner.config.js --output /path/to/output \'src/**/*.{js,jsx}\''); | ||
console.log(' $ i18next-scanner --config i18next-scanner.config.js \'src/**/*.{js,jsx}\''); | ||
console.log(' $ i18next-scanner \'/path/to/src/app.js\' \'/path/to/assets/index.html\''); | ||
console.log(' $ i18next-scanner --config i18next-scanner.config.js "src/**/*.{js,jsx}"'); | ||
console.log(' $ i18next-scanner "/path/to/src/app.js" "/path/to/assets/index.html"'); | ||
console.log(''); | ||
@@ -31,4 +32,14 @@ }); | ||
var src = [].concat(program.args || []); | ||
var src = ensureArray(program.args) | ||
.map(function(s) { | ||
s = s.trim(); | ||
// On Windows, arguments contain spaces must be enclosed with double quotes, not single quotes. | ||
if (s.match(/(^'.*'$|^".*"$)/)) { | ||
// Remove first and last character | ||
s = s.slice(1, -1); | ||
} | ||
return s; | ||
}); | ||
if (!program.config || !program.output || src.length === 0) { | ||
@@ -35,0 +46,0 @@ program.help(); |
{ | ||
"name": "i18next-scanner", | ||
"version": "2.4.3", | ||
"version": "2.4.4", | ||
"description": "Scan your code, extract translation keys/values, and merge them into i18n resource files.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/i18next/i18next-scanner", |
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
79029
13
1170