-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
107 additions
and
82 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
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,5 +1,9 @@ | ||
export * from './commands/dev.js'; | ||
export * from './commands/test.js'; | ||
export * from './commands/cov.js'; | ||
import Test from './commands/test.js'; | ||
import Cov from './commands/cov.js'; | ||
import Dev from './commands/dev.js'; | ||
|
||
export { Test, Cov, Dev }; | ||
|
||
export * from './baseCommand.js'; | ||
export * from './types.js'; | ||
export * from '@oclif/core'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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\run" %* |
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,5 @@ | ||
#!/usr/bin/env node | ||
|
||
import { execute } from '@oclif/core'; | ||
|
||
await execute({ dir: import.meta.url }); |
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 @@ | ||
import { Cov } from '../../../../dist/esm/index.js'; | ||
|
||
export default Cov; |
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,13 +1,14 @@ | ||
import { DefineCommand } from '@artus-cli/artus-cli'; | ||
import { DevCommand as BaseDevCommand } from '../../../../'; | ||
import { Dev } from '../../../../dist/esm/index.js'; | ||
|
||
@DefineCommand({ | ||
command: 'dev', | ||
description: 'Run the development server with my-egg-bin', | ||
}) | ||
export class DevCommand extends BaseDevCommand { | ||
async run() { | ||
export default class MyDev<T extends typeof MyDev> extends Dev<T> { | ||
static override description = 'Run the development server with my-egg-bin'; | ||
|
||
static override examples = [ | ||
'<%= config.bin %> <%= command.id %>', | ||
]; | ||
|
||
public async run(): Promise<void> { | ||
super.run(); | ||
console.info('this is my-egg-bin dev, baseDir: %s', this.base); | ||
console.info('this is my-egg-bin dev, baseDir: %s', this.flags.base); | ||
} | ||
} |
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,12 +1,22 @@ | ||
import { DefineCommand } from '@artus-cli/artus-cli'; | ||
import { BaseCommand } from '../../../../src/index'; | ||
|
||
@DefineCommand({ | ||
command: 'nsp', | ||
description: 'nsp check', | ||
}) | ||
export class NspCommand extends BaseCommand { | ||
async run() { | ||
console.log('run nsp check at baseDir: %s, with %o', this.base, this.ctx.args); | ||
import { BaseCommand, Flags } from '../../../../dist/esm/index.js'; | ||
|
||
export default class Nsp<T extends typeof Nsp> extends BaseCommand<T> { | ||
static override description = 'nsp check'; | ||
|
||
static override examples = [ | ||
'<%= config.bin %> <%= command.id %>', | ||
]; | ||
|
||
static override flags = { | ||
foo: Flags.boolean({ | ||
description: 'foo bar', | ||
}), | ||
}; | ||
|
||
public async run(): Promise<void> { | ||
console.log('run nsp check at baseDir: %s, with %o', this.flags.base, this.args); | ||
if (this.flags.foo) { | ||
console.log('foo is true'); | ||
} | ||
} | ||
} |
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 @@ | ||
import { Test } from '../../../../dist/esm/index.js'; | ||
|
||
export default Test; |
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
Oops, something went wrong.