Skip to content

Commit

Permalink
refactor: migrate to oclif
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Mar 26, 2023
1 parent 164ff0f commit ef456b8
Show file tree
Hide file tree
Showing 125 changed files with 1,674 additions and 1,209 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
node-version: [18]
node-version: [16, 18]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
16
17 changes: 17 additions & 0 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/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);
3 changes: 3 additions & 0 deletions bin/dev.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\dev" %*
8 changes: 8 additions & 0 deletions bin/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env node

const oclif = require('@oclif/core');

oclif
.run()
.then(require('@oclif/core/flush'))
.catch(require('@oclif/core/handle'));
3 changes: 3 additions & 0 deletions bin/run.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\run" %*
8 changes: 0 additions & 8 deletions bin/surgio.js

This file was deleted.

99 changes: 0 additions & 99 deletions lib/command/check.ts

This file was deleted.

50 changes: 0 additions & 50 deletions lib/command/clean-cache.ts

This file was deleted.

78 changes: 0 additions & 78 deletions lib/command/doctor.ts

This file was deleted.

73 changes: 0 additions & 73 deletions lib/command/generate.ts

This file was deleted.

Loading

0 comments on commit ef456b8

Please sign in to comment.