Skip to content

Commit ad356ae

Browse files
authored
Updates @twilio/cli-core to version 7 (#35)
* Updates @twilio/cli-core to version 7 Switches out @oclif/command and @oclif/config for @oclif/core. Updates ./bin/run and commands/watch.js to use @oclif/core. Adds new ./bin/dev script for debug running locally. Adds src/index.js and main property in package.json * Removes moment dependency
1 parent 10bef7d commit ad356ae

File tree

7 files changed

+1045
-2134
lines changed

7 files changed

+1045
-2134
lines changed

bin/dev

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env node
2+
3+
const oclif = require('@oclif/core');
4+
5+
// In dev mode -> use ts-node and dev plugins
6+
process.env.NODE_ENV = 'development';
7+
8+
// In dev mode, always show stack traces
9+
oclif.settings.debug = true;
10+
11+
// Configure the Twilio CLI environment
12+
require('@twilio/cli-core').configureEnv();
13+
14+
// Start the CLI
15+
oclif.run().then(oclif.flush).catch(oclif.Errors.handle);

bin/dev.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
3+
node "%~dp0\dev" %*

bin/run

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/usr/bin/env node
22
// Load up the command module *first* so that we're the parent rather than
33
// some other dependency.
4-
const command = require('@oclif/command');
54

6-
require('@twilio/cli-core').configureEnv();
7-
command.run()
8-
.then(require('@oclif/command/flush'))
9-
.catch(require('@oclif/errors/handle'));
5+
const oclif = require("@oclif/core");
6+
7+
require("@twilio/cli-core").configureEnv();
8+
9+
oclif
10+
.run()
11+
.then(require("@oclif/core/flush"))
12+
.catch(require("@oclif/core/handle"));

0 commit comments

Comments
 (0)