basisjs-tools-build
Advanced tools
Comparing version 1.10.2 to 1.10.3
@@ -0,1 +1,5 @@ | ||
## 1.10.3 (June 13, 2017) | ||
- Fixed option processing that takes several values, i.e. `--theme` and `--ignore-warnings` (@smelukov, #21) | ||
## 1.10.2 (June 2, 2017) | ||
@@ -2,0 +6,0 @@ |
@@ -11,12 +11,10 @@ var fs = require('fs'); | ||
function list(name){ | ||
return function(value){ | ||
var list = this.values[name]; | ||
if (!list || list.fromConfig) | ||
list = []; | ||
list = list.concat(value); | ||
if (value && value.fromConfig) | ||
list.fromConfig = true; | ||
return list; | ||
}; | ||
function list(newValue, oldValue){ | ||
var list = oldValue; | ||
if (!list || list.fromConfig) | ||
list = []; | ||
list = list.concat(newValue); | ||
if (newValue && newValue.fromConfig) | ||
list.fromConfig = true; | ||
return list; | ||
} | ||
@@ -61,3 +59,3 @@ | ||
case 'ignoreWarnings': | ||
result.ignoreWarnings = Array.isArray(config[name]) ? config[name].slice() : []; | ||
result.ignoreWarnings = Array.isArray(config.ignoreWarnings) ? config.ignoreWarnings.slice() : [config.ignoreWarnings]; | ||
result.ignoreWarnings.fromConfig = true; | ||
@@ -72,4 +70,4 @@ break; | ||
case 'theme': | ||
result.theme = [Array.isArray(config.theme) ? config.theme : [config.theme]]; | ||
result.theme[0].fromConfig = true; | ||
result.theme = Array.isArray(config.theme) ? config.theme : [config.theme]; | ||
result.theme.fromConfig = true; | ||
break; | ||
@@ -127,4 +125,4 @@ | ||
.option('--js-cut-dev', 'Remove code marked as debug from JavaScript source (cut off lines after ;;; and /** @cut .. */)') | ||
.option('--theme <name>', 'Which template themes to use (all by default)', list('theme')) | ||
.option('--ignore-warnings <pattern>', 'Set file pattern to be ignored by linter', list('ignoreWarnings')); | ||
.option('--theme <name>', 'Which template themes to use (all by default)', list) | ||
.option('--ignore-warnings <pattern>', 'Set file pattern to be ignored by linter', list); | ||
@@ -131,0 +129,0 @@ if (options && options.preset) |
{ | ||
"name": "basisjs-tools-build", | ||
"title": "Basis.js build tools", | ||
"version": "1.10.2", | ||
"version": "1.10.3", | ||
"homepage": "https://github.com/basisjs/basisjs-tools", | ||
@@ -38,3 +38,3 @@ "description": "Build tools for basis.js framework", | ||
"chalk": "~1.1.1", | ||
"clap": "~1.1.0", | ||
"clap": "^1.2.0", | ||
"es6-promise-polyfill": "^1.2.0", | ||
@@ -41,0 +41,0 @@ "fixed-width-string": "^1.0.0", |
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
296423
9002
+ Addedclap@1.2.3(transitive)
- Removedclap@1.1.3(transitive)
Updatedclap@^1.2.0