docworks-cli
Advanced tools
Comparing version 1.3.2 to 1.3.5
@@ -55,6 +55,7 @@ #!/usr/bin/env node | ||
function ecp() { | ||
var argv = optimist.usage('Usage: $0 ecp -r [remote repo] -s [local sources] -p [file pattern]').demand('r').alias('r', 'remote').describe('r', 'remote repository to merge docs into').demand('fs').alias('fs', 'sources').describe('fs', 'folder containing the source files to extract docs from').demand('p').alias('p', 'project').describe('p', 'project folder name in the docs repo').default('fp', ".+\\.js?$").alias('fp', 'pattern').describe('fp', 'file pattern, defaults to ".+\\.js$"').describe('plug', 'a module name that is a jsdoc plugin').parse(process.argv.slice(3)); | ||
var argv = optimist.usage('Usage: $0 ecp -r [remote repo] -s [local sources] -p [file pattern]').demand('r').alias('r', 'remote').describe('r', 'remote repository to merge docs into').demand('fs').alias('fs', 'sources').describe('fs', 'one or more folders containing the source files to extract docs from').alias('fx', 'excludes').describe('fx', 'one or more folders to exclude (including their children) from extracting docs').default('fp', ".+\\.js?$").alias('fp', 'pattern').describe('fp', 'file pattern, defaults to ".+\\.js$"').demand('p').alias('p', 'project').describe('p', 'project folder name in the docs repo').describe('plug', 'a module name that is a jsdoc plugin').parse(process.argv.slice(3)); | ||
var remote = argv.remote; | ||
var sources = argv.sources; | ||
var excludes = argv.excludes ? Array.isArray(argv.excludes) ? argv.excludes : [argv.excludes] : []; | ||
var pattern = argv.pattern; | ||
@@ -65,3 +66,3 @@ var project = argv.project; | ||
tmp.dir().then(function (o) { | ||
return extractComparePush(remote, o.path, project, { "include": sources, "includePattern": pattern }, plugins); | ||
return extractComparePush(remote, o.path, project, { "include": sources, "includePattern": pattern, "exclude": excludes }, plugins); | ||
}).catch(function () { | ||
@@ -68,0 +69,0 @@ process.exit(1); |
{ | ||
"name": "docworks-cli", | ||
"version": "1.3.2", | ||
"version": "1.3.5", | ||
"description": "", | ||
@@ -9,3 +9,3 @@ "main": "index.js", | ||
"prepublish": "babel src/docworks.js --out-file .bin/docworks.js && babel src --out-dir dist --ignore docworks.js", | ||
"test": "mocha --compilers js:babel-core/register --require babel-polyfill ./test/**/*.spec.js" | ||
"test": "npm run build & mocha --compilers js:babel-core/register --require babel-polyfill ./test/**/*.spec.js" | ||
}, | ||
@@ -12,0 +12,0 @@ "bin": { |
@@ -56,14 +56,16 @@ #!/usr/bin/env node | ||
.usage('Usage: $0 ecp -r [remote repo] -s [local sources] -p [file pattern]') | ||
.demand('r') | ||
.alias('r', 'remote') | ||
.demand( 'r') | ||
.alias( 'r', 'remote') | ||
.describe('r', 'remote repository to merge docs into') | ||
.demand('fs') | ||
.alias('fs', 'sources') | ||
.describe('fs', 'folder containing the source files to extract docs from') | ||
.demand('p') | ||
.alias('p', 'project') | ||
.demand( 'fs') | ||
.alias( 'fs', 'sources') | ||
.describe('fs', 'one or more folders containing the source files to extract docs from') | ||
.alias( 'fx', 'excludes') | ||
.describe('fx', 'one or more folders to exclude (including their children) from extracting docs') | ||
.default( 'fp', ".+\\.js?$") | ||
.alias( 'fp', 'pattern') | ||
.describe('fp', 'file pattern, defaults to ".+\\.js$"') | ||
.demand( 'p') | ||
.alias( 'p', 'project') | ||
.describe('p', 'project folder name in the docs repo') | ||
.default('fp', ".+\\.js?$") | ||
.alias('fp', 'pattern') | ||
.describe('fp', 'file pattern, defaults to ".+\\.js$"') | ||
.describe('plug', 'a module name that is a jsdoc plugin') | ||
@@ -74,2 +76,3 @@ .parse(process.argv.slice(3)); | ||
let sources = argv.sources; | ||
let excludes = argv.excludes?(Array.isArray(argv.excludes)?argv.excludes:[argv.excludes]):[]; | ||
let pattern = argv.pattern; | ||
@@ -80,3 +83,3 @@ let project = argv.project; | ||
tmp.dir().then(o => { | ||
return extractComparePush(remote, o.path, project, {"include": sources, "includePattern": pattern}, plugins); | ||
return extractComparePush(remote, o.path, project, {"include": sources, "includePattern": pattern, "exclude": excludes}, plugins); | ||
}) | ||
@@ -83,0 +86,0 @@ .catch(() => { |
@@ -91,3 +91,2 @@ import chai from 'chai'; | ||
it('should update remote with changes from v2 over v1', async function() { | ||
@@ -94,0 +93,0 @@ await createRemoteOnVer1(); |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 7 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
67537
58
1241
9
8