In my package.json
, I have a script that looks similar to this:
{
...
scripts: {
...
"testdb:e2e": "TESTDB_ENV='...' gulp mocha:e2e:backend && gulp mocha:e2e:frontend"
}
...
}
I am interested in adding a script to target either the backend or frontend with my test environment. However, I am unsure of the conventions for namespacing NPM scripts as I couldn't find any documentation on it. I am considering using a colon for namespacing like gulp does, for example:
"testdb:e2e": "TESTDB_ENV='...' gulp mocha:e2e:backend && gulp mocha:e2e:frontend",
"testdb:e2e:backend": "TESTDB_ENV='...' gulp mocha:e2e:backend",
"testdb:e2e:frontend": "TESTDB_ENV='...' gulp mocha:e2e:frontend"
Is there a standard naming convention for namespacing npm scripts?