Skip to content

Commit

Permalink
remove support starting main script from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
vunb committed Apr 16, 2020
1 parent 05f587d commit 925b1ef
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cmd/up.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ function getMainApp(app) {
let main = app;
let cwd = process.cwd();
if (!app) {
const pkgInfo = path.join(cwd, 'package.json')
// const pkgInfo = path.join(cwd, 'package.json')

if (fs.existsSync(pkgInfo) && require(pkgInfo).main) {
main = require(pkgInfo).main
console.log(`App script is detected in package info: ${chalk.green(main)}`)
}
// if (fs.existsSync(pkgInfo) && require(pkgInfo).main) {
// main = require(pkgInfo).main
// console.log(`App script is detected in package info: ${chalk.green(main)}`)
// }
if (!main) {
// use default elevator @kites/cli/main script.
main = path.resolve(__dirname, '../main.js');
Expand All @@ -35,7 +35,7 @@ function getMainApp(app) {
script += '.ts';
}

console.log(`App script is starting: (${chalk.green(main)}) ${script}`)
console.log(`App script is starting: ${chalk.green(main)}`)
return { script, cwd };
}

Expand Down

0 comments on commit 925b1ef

Please sign in to comment.