Skip to content

Commit

Permalink
[template][promise] exit is called in app.js #8
Browse files Browse the repository at this point in the history
- so all the async functions never get chance to finish execution
- it not the problem of any third party lib #2
  • Loading branch information
at15 committed Sep 12, 2016
1 parent 9aed4b5 commit 768f836
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions cmd/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,20 @@ renderCmd.setFunc((app, args, flags) => {
// console.log(e);
// })

render.renderByFile('../example/tmpl/index.html', {title: 'abc'})
console.log('oh yeah');

render.renderByFile('example/tmpl/index.html', {title: 'abc'})
.then((out)=> {
console.log('I got out!', out);
})
.catch((e)=> {
console.error(e);
});

console.log('oh ha');
setTimeout(()=>{
console.log('what?');
},200);
});

// module.exports = renderCmd;

renderCmd.executeCurrent(null,[],{});
module.exports = renderCmd;
2 changes: 1 addition & 1 deletion lib/cli/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Cli {
} catch (e) {
logger.error('unhandled error in command', e);
}
this.exit(0);
// this.exit(0);
}

loadConfigOrExit() {
Expand Down

0 comments on commit 768f836

Please sign in to comment.