|
@ -37,6 +37,11 @@ export default class Now extends EventEmitter { |
|
|
throw new Error(`Failed to read JSON in "${path}/package.json"`); |
|
|
throw new Error(`Failed to read JSON in "${path}/package.json"`); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!pkg.scripts || !pkg.scripts.start) { |
|
|
|
|
|
throw new Error('Missing `start` script in `package.json`. ' + |
|
|
|
|
|
'See: https://docs.npmjs.com/cli/start.'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (this._debug) console.time('> [debug] Getting files'); |
|
|
if (this._debug) console.time('> [debug] Getting files'); |
|
|
const files = await getFiles(path, pkg, { limit: ONEMB, debug: this._debug }); |
|
|
const files = await getFiles(path, pkg, { limit: ONEMB, debug: this._debug }); |
|
|
if (this._debug) console.timeEnd('> [debug] Getting files'); |
|
|
if (this._debug) console.timeEnd('> [debug] Getting files'); |
|
|