Browse Source

If `package.json` or `Dockerfile` is present, assume it's static (#100)

deployment
master
Jarmo Isotalo 8 years ago
committed by Tony Kovanen
parent
commit
d091240115
  1. 14
      bin/now-deploy.js

14
bin/now-deploy.js

@ -231,7 +231,7 @@ async function sync(token) {
hasPackage = true
}
[hasPackage, hasDockerfile, isStatic] = await Promise.all([
[hasPackage, hasDockerfile] = await Promise.all([
await (async () => {
try {
await stat(resolve(path, 'package.json'))
@ -247,14 +247,6 @@ async function sync(token) {
return false
}
return true
})(),
await (async () => {
try {
await stat(resolve(path, 'index.html'))
} catch (err) {
return false
}
return true
})()
])
@ -290,10 +282,6 @@ async function sync(token) {
}
deploymentType = 'docker'
} else if (isStatic) {
if (debug) {
console.log('[debug] `index.html` found, assuming static deployment')
}
} else {
if (debug) {
console.log('[debug] No manifest files found, assuming static deployment')

Loading…
Cancel
Save