You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

skip-local-postinstall

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skip-local-postinstall - npm Package Compare versions

Comparing version

to
2.0.1

9

bin.js
#!/usr/bin/env node
import { execSync } from 'child_process'
import { skip } from './index.js'
skip(1)
skip()
const command = ['node', ...process.argv.slice(2, process.argv.length)].join(
' '
)
execSync(command, { stdio: 'inherit' })

@@ -5,2 +5,9 @@ # Changelog

### [2.0.1](https://github.com/tobua/skip-local-postinstall/compare/v2.0.0...v2.0.1) (2021-03-16)
### Bug Fixes
* **bin:** bin script with successful exit code and documentation ([a2b8d15](https://github.com/tobua/skip-local-postinstall/commit/a2b8d15a6185afaea6e75d5b6119aa0de8a86540))
## [2.0.0](https://github.com/tobua/skip-local-postinstall/compare/v1.0.5...v2.0.0) (2021-03-16)

@@ -7,0 +14,0 @@

7

package.json
{
"name": "skip-local-postinstall",
"description": "Skips postinstall when installed locally.",
"version": "2.0.0",
"description": "Skip postinstall on local npm installs.",
"version": "2.0.1",
"repository": "github:tobua/skip-local-postinstall",
"scripts": {
"build": "padua build",
"start": "padua watch",
"hello": "skip-local-postinstall && echo 'test'"
"start": "padua watch"
},

@@ -11,0 +10,0 @@ "padua": {

@@ -5,8 +5,6 @@ # skip-local-postinstall

```json
```js
// package.json
{
"scripts": {
"postinstall": "node ./installation.js"
}
"scripts": {
"postinstall": "node ./installation.js"
}

@@ -27,6 +25,11 @@ ```

Bin script testing
## Compiled Postinstall File
// cd node_modules/.bin (copy a link and rename)
ln -hfs /Users/tobua/skip-local-postinstall/bin.js skip-local-postinstall
chmod 755 ./bin.js
In cases where you want a compiled postinstall script (i.e. source in TypeScript) this plugin also includes a bin script. It's arguments will be passed directly to the `node` command and can include additional arguments apart from the file to run.
```js
// package.json
"scripts": {
"postinstall": "skip-local-postinstall ./dist/installation.js"
}
```