Skip to content

Instantly share code, notes, and snippets.

@wheresrhys
Created June 10, 2020 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wheresrhys/c64ec1d88ea678ae8689cc35dac8f232 to your computer and use it in GitHub Desktop.
Save wheresrhys/c64ec1d88ea678ae8689cc35dac8f232 to your computer and use it in GitHub Desktop.
// Allow package.json scripts property to be defined in a separate .npmscripts.js file
// (Prior art all the *rc files for various other tools - once there is need for, comments, multiline
// dependencies, logic... it pays to support .js as well as .json
// can require any libraries you like
require('dotenv').exec();
module.exports = {
// strings are run with shell
test: "jest",
// functions are called in the js process
loggo: () => console.log('ra'),
// arrays express dependencies between tasks, similar to makefile
boop: ['loggo', 'test', () => console.log('boop')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment