Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docworks-cli

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docworks-cli - npm Package Compare versions

Comparing version 1.3.2 to 1.3.5

test/extract-compare-push-e2e.spec.js

5

.bin/docworks.js

@@ -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);

4

package.json
{
"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();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc