From 6a8ac7d1b1225adc84ad7698c30d8928a8a93e95 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Tue, 10 Oct 2023 11:08:58 -0600 Subject: [PATCH] fix: update bin scripts --- bin/dev | 17 ----------------- bin/dev.js | 8 ++++++++ bin/run | 5 ----- bin/run.js | 8 ++++++++ 4 files changed, 16 insertions(+), 22 deletions(-) delete mode 100755 bin/dev create mode 100755 bin/dev.js delete mode 100755 bin/run create mode 100755 bin/run.js diff --git a/bin/dev b/bin/dev deleted file mode 100755 index bbc3f51..0000000 --- a/bin/dev +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env node - -const oclif = require('@oclif/core') - -const path = require('path') -const project = path.join(__dirname, '..', 'tsconfig.json') - -// In dev mode -> use ts-node and dev plugins -process.env.NODE_ENV = 'development' - -require('ts-node').register({project}) - -// In dev mode, always show stack traces -oclif.settings.debug = true; - -// Start the CLI -oclif.run().then(oclif.flush).catch(oclif.Errors.handle) diff --git a/bin/dev.js b/bin/dev.js new file mode 100755 index 0000000..515b012 --- /dev/null +++ b/bin/dev.js @@ -0,0 +1,8 @@ +#!/usr/bin/env ts-node +// eslint-disable-next-line node/shebang +async function main() { + const {execute} = await import('@oclif/core') + await execute({development: true, dir: import.meta.url}) +} + +await main() diff --git a/bin/run b/bin/run deleted file mode 100755 index a7635de..0000000 --- a/bin/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node - -const oclif = require('@oclif/core') - -oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle')) diff --git a/bin/run.js b/bin/run.js new file mode 100755 index 0000000..58ca6bf --- /dev/null +++ b/bin/run.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +async function main() { + const {execute} = await import('@oclif/core') + await execute({dir: import.meta.url}) +} + +await main()