Skip to content

Commit

Permalink
fix: fix hooks to work with ts-node
Browse files Browse the repository at this point in the history
Fixes #78
  • Loading branch information
jdx committed Mar 24, 2018
1 parent 2b817db commit e117a85
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/generators/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class HookGenerator extends Generator {
}
this.pjson.oclif = this.pjson.oclif || {}
let hooks = this.pjson.oclif.hooks = this.pjson.oclif.hooks || {}
let p = `./${this._ts ? 'lib' : 'src'}/hooks/${this.options.event}/${this.options.name}.js`
let p = `./${this._ts ? 'lib' : 'src'}/hooks/${this.options.event}/${this.options.name}`
if (hooks[this.options.event]) {
hooks[this.options.event] = _.castArray(hooks[this.options.event])
hooks[this.options.event].push(p)
Expand Down
2 changes: 0 additions & 2 deletions test/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ module.exports = file => {
case 'hook':
build('plugin', name)
generate('hook myhook --defaults --force')
// TODO: remove this compilation step
sh.exec('tsc')
sh.exec('yarn test')
sh.exec('node ./bin/run hello')
sh.exec('yarn run prepublishOnly')
Expand Down

0 comments on commit e117a85

Please sign in to comment.