2021-02-23 21:28:23 +01:00
|
|
|
<!-- DO NOT EDIT MANUALLY, THIS FILE HAS BEEN GENERATED -->
|
|
|
|
|
|
|
|
|
|
# @vates/toggle-scripts
|
|
|
|
|
|
|
|
|
|
[](https://npmjs.org/package/@vates/toggle-scripts)  [](https://bundlephobia.com/result?p=@vates/toggle-scripts) [](https://npmjs.org/package/@vates/toggle-scripts)
|
|
|
|
|
|
|
|
|
|
> Easily enable/disable scripts in package.json
|
|
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
|
|
Installation of the [npm package](https://npmjs.org/package/@vates/toggle-scripts):
|
|
|
|
|
|
2023-02-06 11:25:12 +01:00
|
|
|
```sh
|
|
|
|
|
npm install --save @vates/toggle-scripts
|
2021-02-23 21:28:23 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
Usage: toggle-scripts options...
|
|
|
|
|
|
|
|
|
|
Easily enable/disable scripts in package.json
|
|
|
|
|
|
|
|
|
|
Options
|
2021-02-23 21:54:26 +01:00
|
|
|
+<script> Enable the script <script>, ie remove the prefix `_`
|
|
|
|
|
-<script> Disable the script <script>, ie prefix it with `_`
|
2021-02-23 21:28:23 +01:00
|
|
|
|
|
|
|
|
Examples
|
|
|
|
|
toggle-scripts +postinstall +preuninstall
|
|
|
|
|
toggle-scripts -postinstall -preuninstall
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
For example, if you want `postinstall` hook only in dev:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
// 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](https://github.com/vatesfr/xen-orchestra/issues)
|
|
|
|
|
you've encountered;
|
|
|
|
|
- fork and create a pull request.
|
|
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
[ISC](https://spdx.org/licenses/ISC) © [Vates SAS](https://vates.fr)
|