|
@ -16,6 +16,7 @@ module.exports = async function (path, { |
|
|
deploymentType = 'npm', |
|
|
deploymentType = 'npm', |
|
|
deploymentName, |
|
|
deploymentName, |
|
|
quiet = false, |
|
|
quiet = false, |
|
|
|
|
|
strict = true, |
|
|
isStatic = false |
|
|
isStatic = false |
|
|
}) { |
|
|
}) { |
|
|
let pkg = {} |
|
|
let pkg = {} |
|
@ -50,7 +51,7 @@ module.exports = async function (path, { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!pkg.scripts || (!pkg.scripts.start && !pkg.scripts['now-start'])) { |
|
|
if (strict && (!pkg.scripts || (!pkg.scripts.start && !pkg.scripts['now-start']))) { |
|
|
const e = Error('Missing `start` (or `now-start`) script in `package.json`. ' + |
|
|
const e = Error('Missing `start` (or `now-start`) script in `package.json`. ' + |
|
|
'See: https://docs.npmjs.com/cli/start.') |
|
|
'See: https://docs.npmjs.com/cli/start.') |
|
|
e.userError = true |
|
|
e.userError = true |
|
@ -81,7 +82,7 @@ module.exports = async function (path, { |
|
|
throw e |
|
|
throw e |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (docker.length <= 0) { |
|
|
if (strict && docker.length <= 0) { |
|
|
const e = Error('No commands found in `Dockerfile`') |
|
|
const e = Error('No commands found in `Dockerfile`') |
|
|
e.userError = true |
|
|
e.userError = true |
|
|
throw e |
|
|
throw e |
|
|