fix: set project path for single CLIs
Fixes
DELETE
templates/single/bin/run
-#!/usr/bin/env node
-
-const fs = require('fs')
-const path = require('path')
-const dev = fs.existsSync(path.join(__dirname, '../tsconfig.json'))
-
-if (dev) require('ts-node/register')
-
-require(`../${dev ? 'src' : 'lib'}`).run()

MODIFY
templates/single/bin/run.ts
templates/single/bin/run.ts
const fs = require('fs')
const path = require('path')
-const dev = fs.existsSync(path.join(__dirname, '../tsconfig.json'))
+const project = path.join(__dirname, '../tsconfig.json')
+const dev = fs.existsSync(project)
-if (dev) require('ts-node/register')
+if (dev) {
+ require('ts-node').register({project})
+}
require(`../${dev ? 'src' : 'lib'}`).run()
.catch(require('@oclif/errors/handle'))

fix: set project path for single CLIs

Fixes #161