Browse Source

index: validate `name` in package.json

master
Guillermo Rauch 9 years ago
parent
commit
e924034425
  1. 6
      lib/index.js

6
lib/index.js

@ -44,6 +44,12 @@ export default class Now extends EventEmitter {
throw e;
}
if (null == pkg.name || 'string' !== typeof pkg.name) {
const e = Error('Missing or invalid `name` in `package.json`.');
e.userError = true;
throw e;
}
if (!pkg.scripts || !pkg.scripts.start) {
const e = Error('Missing `start` script in `package.json`. ' +
'See: https://docs.npmjs.com/cli/start.');

Loading…
Cancel
Save