Permalink
Browse files

[template][promise] exit is called in app.js #8

- 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 768f836e6b1f5a7e9b762f7e42d8fbc95a1b6364
Showing with 9 additions and 5 deletions.
  1. +8 −4 cmd/render.js
  2. +1 −1 lib/cli/app.js
View
@@ -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;
View
@@ -62,7 +62,7 @@ class Cli {
} catch (e) {
logger.error('unhandled error in command', e);
}
this.exit(0);
// this.exit(0);
}
loadConfigOrExit() {

0 comments on commit 768f836

Please sign in to comment.