npm-scripts-config
npm-scripts-config
can extract scripts from package.json inside a config file that can be shared between repositories.
Installation
This npm package should be installed as a dev dependency.
$ npm install --save--dev npm-scripts-config
Usage
.scriptsrc
files will be automatically used as the default configuration file and scripts defined in it could be used from the package.json
's scripts section.
package.json
.scriptsrc
From your repository you can run your scripts like standard npm scripts:
npm run test
or
yarn test
node_modules
Extend a configuration from If you want to reuse a shared configuration you can specify it using the @extends
key.
.scriptsrc
Where the npm package my-custom-npm-package-name
contains a .scriptsrc
at its root.