Socket
Socket
Sign inDemoInstall

add-npm-script

Package Overview
Dependencies
57
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    add-npm-script

Adds a provided script to `package.json`.


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
911 kB
Created
Weekly downloads
 

Changelog

Source

3.0.0 (2019-09-29)

⚠ BREAKING CHANGES

  • updated modify-pkg-up which requires Node.js 8

  • some dependency updates (96a8d58)

Readme

Source

Build Status JavaScript Style Guide

add-npm-script

Adds a provided script to package.json.

Why?

How?

Example

const addNpmScript = require('add-npm-script')
addNpmScript('wow', 'echo such nice. much like.')
  .then(() => console.log('done'))
$ npm run wow
such nice. much like.

API

addNpmScript(name, script)
  • name: name of the script
  • script: script itself

Returns an empty promise.

Keywords

FAQs

Last updated on 29 Sep 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc