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

opt-cli

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opt-cli - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

23

bin/index.js

@@ -6,3 +6,7 @@ #!/usr/bin/env node

var
path = require( 'path' ),
cli = require( 'cli' ),
managePath = require( 'manage-path' ),
clone = require( 'lodash.clone' ),
spawn = require( 'spawn-command' ),
opt = require( '../lib/index' );

@@ -18,3 +22,7 @@

cli.main( function cliMain( args, options ) {
var info = function emptyFn() {};
var
info = function emptyFn() {},
cwd = process.cwd(),
env = clone( process.env ),
alteredEnvPath;

@@ -41,8 +49,9 @@ // invalid arguments: "in" OR "out" have to be specified, as well es "exec"

info( 'args:' );
info( JSON.stringify( args ) );
info( 'execute all the things: ' + options.exec );
cli.exec( options.exec, function dispatchOutput( output ) {
console.log( output.join( '\n' ) );
} );
// prepare PATH env var to include cwd/node_modules/bin
alteredEnvPath = managePath( env );
alteredEnvPath.unshift( path.resolve( cwd, 'node_modules', '.bin' ) );
info( 'Execute all the things: ' + options.exec );
spawn( options.exec, { stdio: 'inherit', env: env } )
.on( 'exit', process.exit );
} );
{
"name": "opt-cli",
"version": "1.0.0",
"version": "1.1.0",
"description": "Execute CLI Statements based upon Opt-In / Out-Out Rules.",

@@ -17,2 +17,3 @@ "main": "lib/index.js",

"check-coverage": "nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100",
"report-coverage": "cat ./coverage/lcov.info | node_modules/.bin/codecov",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"

@@ -37,3 +38,6 @@ },

"dependencies": {
"cli": "0.11.2"
"cli": "0.11.2",
"lodash.clone": "4.3.1",
"manage-path": "2.0.0",
"spawn-command": "0.0.2-1"
},

@@ -43,2 +47,3 @@ "devDependencies": {

"ava": "0.13.0",
"codecov": "1.0.1",
"cz-conventional-changelog": "1.1.5",

@@ -50,4 +55,4 @@ "eslint": "2.4.0",

"nyc": "6.1.1",
"validate-commit-msg": "2.4.1",
"semantic-release": "4.3.5"
"semantic-release": "4.3.5",
"validate-commit-msg": "2.4.1"
},

@@ -54,0 +59,0 @@ "config": {

# opt-cli
Execute CLI Statements based upon Opt-In / Out-Out Rules.
[![Build Status](https://img.shields.io/travis/ta2edchimp/opt-cli/master.svg?style=flat-square)](https://travis-ci.org/ta2edchimp/opt-cli)
[![Code Coverage](https://img.shields.io/codecov/c/github/ta2edchimp/opt-cli.svg?style=flat-square)](https://codecov.io/github/ta2edchimp/opt-cli)
[![version](https://img.shields.io/npm/v/opt-cli.svg?style=flat-square)](http://npm.im/opt-cli)
[![downloads](https://img.shields.io/npm/dm/opt-cli.svg?style=flat-square)](http://npm-stat.com/charts.html?package=opt-cli&from=2016-03-20)
[![MIT License](https://img.shields.io/npm/l/opt-cli.svg?style=flat-square)](http://opensource.org/licenses/MIT)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
## Installation

@@ -78,3 +88,3 @@

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
| [![Kent C. Dodds](https://avatars3.githubusercontent.com/u/1500684?v=3&s=100)<br /><sub>Kent C. Dodds</sub>]()<br />[💻](https://github.com/ta2edchimp/opt-cli/commits?author=kentcdodds) | [![Guilherme J. Tramontina](https://avatars2.githubusercontent.com/u/374635?v=3&s=100)<br /><sub>Guilherme J. Tramontina</sub>]()<br />[💻](https://github.com/ta2edchimp/opt-cli/commits?author=gtramontina) | [![Andreas Windt](https://avatars1.githubusercontent.com/u/262436?v=3&s=100)<br /><sub>Andreas Windt</sub>]()<br />[💻](https://github.com/ta2edchimp/opt-cli/commits?author=ta2edchimp) |
| [![Kent C. Dodds](https://avatars3.githubusercontent.com/u/1500684?v=3&s=100)<br /><sub>Kent C. Dodds</sub>]()<br />[💻](https://github.com/ta2edchimp/opt-cli/commits?author=kentcdodds) 👀 | [![Guilherme J. Tramontina](https://avatars2.githubusercontent.com/u/374635?v=3&s=100)<br /><sub>Guilherme J. Tramontina</sub>]()<br />[💻](https://github.com/ta2edchimp/opt-cli/commits?author=gtramontina) | [![Andreas Windt](https://avatars1.githubusercontent.com/u/262436?v=3&s=100)<br /><sub>Andreas Windt</sub>]()<br />[💻](https://github.com/ta2edchimp/opt-cli/commits?author=ta2edchimp) [📖](https://github.com/ta2edchimp/opt-cli/commits?author=ta2edchimp) [⚠️](https://github.com/ta2edchimp/opt-cli/commits?author=ta2edchimp) |
| :---: | :---: | :---: |

@@ -87,18 +97,1 @@ <!-- ALL-CONTRIBUTORS-LIST:END -->

Special thanks to [@kentcdodds](https://github.com/kentcdodds) for encouraging to engage in oss, for the wonderful resources (check out the [Egghead videos!](https://egghead.io/series/how-to-write-an-open-source-javascript-library)) and — together with [gtramontina](https://github.com/gtramontina) — for coming up with [the original idea to this module](https://github.com/gtramontina/ghooks/issues/48#issuecomment-194002689)!
## TODO
- [x] Scaffold all the things
- [x] Make a working proof
- [x] Setup ...
- [x] Linter
- [x] Tests
- [x] Code Coverage
- [ ] Setup a Documentation
- [x] Installation & Usage
- [x] Contributors
- [x] Acknowledgements
- [x] Contribution Rules
- [ ] Badges!!
- [ ] Setup `semantic-release`
- [ ] Release all the things

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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