New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

npsh

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npsh - npm Package Compare versions

Comparing version 1.0.7 to 2.0.0

lib/buildBin.js

25

package.json
{
"name": "npsh",
"version": "1.0.7",
"version": "2.0.0",
"description": "Node.js package scripts helper",
"bin": {
"npsh.svc": "./svc.js",
"npsh.hooks": "./hooks/bin.js",
"npsh.bin": "./build_bin.js"
"npsh": "./lib/index.js"
},
"files": [
"svc.js",
"hooks",
"build_lib.js"
"lib"
],
"scripts": {
"format": "prettier --write '**/*.{js,json,md,yml,yaml}'",
"format:check": "prettier -l '**/*.{js,json,md,yml,yaml}'",
"spell": "cspell '**/*'",
"svc": "./lib/index.js svc andr-ii npsh master",
"test": "jest --coverage"
},
"repository": {

@@ -27,3 +30,9 @@ "type": "git",

"author": "Andrii Lytovchenko <andr.lyt.dev@gmail.com>",
"license": "MIT"
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.2.5",
"cspell": "^6.18.1",
"jest": "^29.3.1",
"prettier": "^2.8.2"
}
}
# npsh
[![NPM version][npm-img]][npm-url]
[![Coverage Status][coverage-img]][coverage-url]
Node.js package scripts helper.
Inscludes commonly used scripts for CI, so
Includes commonly used scripts for CI, so
they can be added from one `npm` package instead of

@@ -27,3 +28,3 @@ being copied among different repos.

```json
"svc": "npsh.svc github_user_name project_name branch_name"
"svc": "npsh svc github_user_name project_name branch_name"
```

@@ -34,3 +35,3 @@

```json
"svc": "npsh.svc andr-ii nuti master"
"svc": "npsh svc andr-ii nuti master"
```

@@ -44,3 +45,3 @@

```json
"hooks": "npsh.hooks"
"hooks": "npsh hooks"
```

@@ -68,5 +69,6 @@

b
If your project has an executable `./bin/index.js` file and you
would like to avoid to have it in the development (TypeScript for example)
project - `npsh.bin` can be used. It generates `./bin/index.js` executable file
project - `npsh bin` can be used. It generates `./bin/index.js` executable file
which requires your `lib` module by default.

@@ -77,3 +79,3 @@

```json
"build:bin": "npsh.bin"
"build:bin": "npsh bin"
```

@@ -94,6 +96,6 @@

```json
"build:bin": "npsh.bin 'myFunc()'"
"build:bin": "npsh bin 'myFunc()'"
```
After execurion `./bin/index.js` will have following content:
After execution `./bin/index.js` will have following content:

@@ -108,1 +110,3 @@ ```js

[npm-url]: https://www.npmjs.com/package/npsh
[coverage-img]: https://coveralls.io/repos/github/andr-ii/npsh/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/andr-ii/npsh?branch=master
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