-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#25: remove lodash dep from init. reorganize in prep for abstraction
- Loading branch information
Showing
9 changed files
with
112 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#!/usr/bin/env node | ||
|
||
require('@oclif/command') | ||
.run() | ||
.then(require('@oclif/command/flush')) | ||
|
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,19 +1,19 @@ | ||
const {Command} = require('@oclif/command'); | ||
|
||
class InstallCommand extends Command { | ||
static description = 'install things'; | ||
class AddCommand extends Command { | ||
static description = 'add things'; | ||
|
||
static usage = 'usage'; | ||
|
||
static aliases = ['install']; | ||
// static aliases = ['install']; | ||
|
||
static examples = []; | ||
|
||
async run() { | ||
const {flags} = this.parse(InstallCommand); | ||
const {flags} = this.parse(AddCommand); | ||
const name = flags.name || 'world'; | ||
this.log(`goodbye ${name} from ./src/commands/hello.js`); | ||
} | ||
} | ||
|
||
module.exports = InstallCommand; | ||
module.exports = AddCommand; |
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 @@ | ||
const {Command} = require('@oclif/command'); | ||
|
||
class InstallCommand extends Command { | ||
static description = 'install things'; | ||
|
||
static usage = 'usage'; | ||
|
||
static examples = []; | ||
|
||
async run() { | ||
const {flags} = this.parse(InstallCommand); | ||
const name = flags.name || 'world'; | ||
this.log(`goodbye ${name} from ./src/commands/hello.js`); | ||
} | ||
} | ||
|
||
module.exports = InstallCommand; |
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,19 @@ | ||
const {Command} = require('@oclif/command'); | ||
|
||
class UninstallCommand extends Command { | ||
static description = 'install things'; | ||
|
||
static usage = 'usage'; | ||
|
||
// static aliases = ['install']; | ||
|
||
static examples = []; | ||
|
||
async run() { | ||
const {flags} = this.parse(UninstallCommand); | ||
const name = flags.name || 'world'; | ||
this.log(`goodbye ${name} from ./src/commands/hello.js`); | ||
} | ||
} | ||
|
||
module.exports = UninstallCommand; |
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
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 |
---|---|---|
@@ -1,27 +1,30 @@ | ||
/* | ||
* New plugin types: | ||
* HyperdrivePlugin extends Config.Plugin | ||
* 1. accepts a list of commands and an optional selector function for a "parent" | ||
* | ||
* | ||
*/ | ||
/* | ||
const Config = require('@oclif/config'); | ||
const OclifPlugin = require('@oclif/config').Plugin; | ||
|
||
class LandoOclifPlugin extends OclifPlugin { | ||
constructor(config, replace) { | ||
super(config); | ||
this.replace = replace; | ||
} | ||
|
||
get hooks() { | ||
return {}; | ||
} | ||
|
||
class DynamicPlugin extends Config.Plugin { | ||
get hooks() { return {} } | ||
get topics() { | ||
return [] | ||
return []; | ||
} | ||
|
||
// @TODO: do we need this? | ||
get commandIDs() { | ||
return ['mydynamiccommand'] | ||
return [this.replace.id]; | ||
} | ||
|
||
get commands() { | ||
const cmd = require('../more/bye'); | ||
cmd.id = 'bye'; | ||
const cmd = require(this.replace.path); | ||
cmd.id = this.replace.id; | ||
cmd.load = () => cmd; | ||
return [cmd]; | ||
} | ||
} | ||
*/ | ||
|
||
module.exports = LandoOclifPlugin; |