fix: fix hooks to work with ts-node
Fixes
MODIFY
src/generators/hook.ts
src/generators/hook.ts
@@ -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)

MODIFY
test/run.js
test/run.js
@@ -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')

fix: fix hooks to work with ts-node

Fixes #78