-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new cockle-config command that prints cockle version (#60)
* Add new cockle-config command that prints cockle version * Exclude src/version.ts from linting
- Loading branch information
1 parent
d1feb64
commit 1359449
Showing
4 changed files
with
21 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -10,3 +10,4 @@ test/package-lock.json | |
*.wasm | ||
cockle_wasm_env/ | ||
demo/package-lock.json | ||
src/version.ts |
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,16 @@ | ||
import { BuiltinCommand } from './builtin_command'; | ||
import { Context } from '../context'; | ||
import { ExitCode } from '../exit_code'; | ||
import { COCKLE_VERSION } from '../version'; | ||
|
||
export class CockleConfigCommand extends BuiltinCommand { | ||
get name(): string { | ||
return 'cockle-config'; | ||
} | ||
|
||
protected async _run(context: Context): Promise<number> { | ||
const { stdout } = context; | ||
stdout.write(`cockle ${COCKLE_VERSION}\n`); | ||
return ExitCode.SUCCESS; | ||
} | ||
} |
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