-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: migrating from oclif v1 to v2 (#152)
- Loading branch information
Showing
113 changed files
with
4,135 additions
and
4,569 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
|
||
node "%~dp0\dev" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,6 @@ | ||
#!/usr/bin/env node | ||
|
||
/* | ||
* Copyright 2022, Nuance, Inc. and its contributors. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in | ||
* the LICENSE file in the root directory of this source tree. | ||
*/ | ||
const oclif = require('@oclif/core') | ||
|
||
const MIN_NODE_VERSION = 14 | ||
|
||
if (process && process.versions && process.versions.node) { | ||
const nodeVersion = process.versions.node | ||
const nodeMajorVersion = Number.parseInt(nodeVersion.split('.'), 10) | ||
|
||
if (nodeMajorVersion < MIN_NODE_VERSION) { | ||
console.error(`Your system is running Node.js version ${nodeVersion}`) | ||
console.error(`mix-cli requires version ${MIN_NODE_VERSION} of Node.js at a minimum.`) | ||
console.error('Please upgrade your version of Node.js.') | ||
process.exitCode = 1 | ||
return | ||
} | ||
|
||
require('@oclif/command').run() | ||
.then(require('@oclif/command/flush')) | ||
.catch(require('@oclif/errors/handle')) | ||
} | ||
// Start the CLI | ||
oclif.run().then(oclif.flush).catch(oclif.Errors.handle) |
Oops, something went wrong.