|
|
@ -1,6 +1,6 @@ |
|
|
|
const {basename, resolve: resolvePath} = require('path') |
|
|
|
const chalk = require('chalk') |
|
|
|
const {readFile} = require('fs-promise') |
|
|
|
const {readFile, exists} = require('fs-promise') |
|
|
|
const {parse: parseDockerfile} = require('docker-file-parser') |
|
|
|
|
|
|
|
const listPackage = { |
|
|
@ -45,6 +45,8 @@ async function readMetaData(path, { |
|
|
|
// when both a package.json and Dockerfile exist
|
|
|
|
if (nowConfig.type) { |
|
|
|
deploymentType = nowConfig.type |
|
|
|
} else if (nowConfig.type === undefined && !await exists(resolvePath(path, 'package.json'))) { |
|
|
|
deploymentType = 'static' |
|
|
|
} |
|
|
|
if (nowConfig.name) { |
|
|
|
deploymentName = nowConfig.name |
|
|
|