@vates/toggle-scripts

1.0.0 • Public • Published

@vates/toggle-scripts

Package Version License PackagePhobia Node compatibility

Easily enable/disable scripts in package.json

Install

Installation of the npm package:

> npm install --save @vates/toggle-scripts

Usage

Usage: toggle-scripts options...

  Easily enable/disable scripts in package.json

  Options
    +<script>    Enable the script <script>, ie remove the prefix `_`
    -<script>    Disable the script <script>, ie prefix it with `_`

  Examples
    toggle-scripts +postinstall +preuninstall
    toggle-scripts -postinstall -preuninstall

For example, if you want postinstall hook only in dev:

// package.json
{
  "scripts": {
    "postinstall": "<some dev only command>",
    "prepublishOnly": "toggle-scripts -postinstall",
    "postpublish": "toggle-scripts +postinstall"
  }
}

Contributions

Contributions are very welcomed, either on the documentation or on the code.

You may:

  • report any issue you've encountered;
  • fork and create a pull request.

License

ISC © Vates SAS

/@vates/toggle-scripts/

    Package Sidebar

    Install

    npm i @vates/toggle-scripts

    Weekly Downloads

    123

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    4.02 kB

    Total Files

    3

    Last publish

    Collaborators

    • mlssfrncjrg
    • b-nollet
    • arnogues
    • florent.beauchamp
    • mathieura
    • enishowk
    • tgoettelmann
    • julien-f
    • marsaud
    • olivierlambert
    • pdonias