-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "chore: remove outdated example [skip ci]"
This reverts commit 1b4c956.
- Loading branch information
1 parent
1b4c956
commit 8abd256
Showing
9 changed files
with
1,902 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*-debug.log | ||
*-error.log | ||
.oclif.manifest.json | ||
/dist | ||
/lib | ||
/node_modules | ||
/package-lock.json | ||
/tmp |
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,71 @@ | ||
s3-update-example-cli | ||
===================== | ||
|
||
|
||
|
||
[![Version](https://img.shields.io/npm/v/s3-update-example-cli.svg)](https://npmjs.org/package/s3-update-example-cli) | ||
[![CircleCI](https://circleci.com/gh/jdxcode/s3-update-example-cli/tree/master.svg?style=shield)](https://circleci.com/gh/jdxcode/s3-update-example-cli/tree/master) | ||
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/jdxcode/s3-update-example-cli?branch=master&svg=true)](https://ci.appveyor.com/project/jdxcode/s3-update-example-cli/branch/master) | ||
[![Downloads/week](https://img.shields.io/npm/dw/s3-update-example-cli.svg)](https://npmjs.org/package/s3-update-example-cli) | ||
[![License](https://img.shields.io/npm/l/s3-update-example-cli.svg)](https://github.com/jdxcode/s3-update-example-cli/blob/master/package.json) | ||
|
||
<!-- toc --> | ||
* [Usage](#usage) | ||
* [Commands](#commands) | ||
<!-- tocstop --> | ||
# Usage | ||
<!-- usage --> | ||
```sh-session | ||
$ npm install -g s3-update-example-cli | ||
$ s3-update-example-cli COMMAND | ||
running command... | ||
$ s3-update-example-cli (-v|--version|version) | ||
s3-update-example-cli/0.0.0 darwin-x64 node-v9.11.1 | ||
$ s3-update-example-cli --help [COMMAND] | ||
USAGE | ||
$ s3-update-example-cli COMMAND | ||
... | ||
``` | ||
<!-- usagestop --> | ||
# Commands | ||
<!-- commands --> | ||
* [s3-update-example-cli hello [FILE]](#s-3-update-example-cli-hello-file) | ||
* [s3-update-example-cli help [COMMAND]](#s-3-update-example-cli-help-command) | ||
|
||
## s3-update-example-cli hello [FILE] | ||
|
||
describe the command here | ||
|
||
``` | ||
USAGE | ||
$ s3-update-example-cli hello [FILE] | ||
OPTIONS | ||
-f, --force | ||
-h, --help show CLI help | ||
-n, --name=name name to print | ||
EXAMPLE | ||
$ s3-update-example-cli hello | ||
hello world from ./src/hello.ts! | ||
``` | ||
|
||
_See code: [src/commands/hello.ts](https://github.com/jdxcode/s3-update-example-cli/blob/v0.0.0/src/commands/hello.ts)_ | ||
|
||
## s3-update-example-cli help [COMMAND] | ||
|
||
display help for s3-update-example-cli | ||
|
||
``` | ||
USAGE | ||
$ s3-update-example-cli help [COMMAND] | ||
ARGUMENTS | ||
COMMAND command to show help for | ||
OPTIONS | ||
--all see all commands in CLI | ||
``` | ||
|
||
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v1.2.3/src/commands/help.ts)_ | ||
<!-- commandsstop --> |
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,4 @@ | ||
#!/usr/bin/env node | ||
|
||
require('@oclif/command').run() | ||
.catch(require('@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\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,84 @@ | ||
{ | ||
"name": "s3-update-example-cli", | ||
"version": "2.0.0", | ||
"author": "Jeff Dickey @jdxcode", | ||
"bin": { | ||
"s3-example": "./bin/run" | ||
}, | ||
"bugs": "https://github.com/jdxcode/s3-update-example-cli/issues", | ||
"dependencies": { | ||
"@oclif/command": "^1.5.0", | ||
"@oclif/config": "^1.7.2", | ||
"@oclif/plugin-help": "^2.1.0", | ||
"@oclif/plugin-update": "^1.3.1" | ||
}, | ||
"devDependencies": { | ||
"@oclif/dev-cli": "^1.17.0", | ||
"@types/node": "^8.10.59", | ||
"aws-sdk": "^2.304.0", | ||
"globby": "^8.0.1", | ||
"ts-node": "^7.0.1", | ||
"tslib": "^1.9.3", | ||
"typescript": "^3.0.1" | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"files": [ | ||
"oclif.manifest.json", | ||
"/bin", | ||
"/lib" | ||
], | ||
"homepage": "https://github.com/jdxcode/s3-update-example-cli", | ||
"keywords": [ | ||
"oclif" | ||
], | ||
"license": "MIT", | ||
"main": "lib/index.js", | ||
"oclif": { | ||
"commands": "./lib/commands", | ||
"bin": "example-cli", | ||
"dirname": "oclif-example-s3-cli", | ||
"update": { | ||
"s3": { | ||
"bucket": "oclif-staging", | ||
"templates": { | ||
"target": { | ||
"unversioned": "tarballs/<%- bin %>/<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>", | ||
"versioned": "tarballs/<%- bin %>/<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>", | ||
"manifest": "tarballs/<%- bin %>/<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>" | ||
}, | ||
"vanilla": { | ||
"unversioned": "tarballs/<%- bin %>/<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>", | ||
"versioned": "tarballs/<%- bin %>/<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>", | ||
"manifest": "tarballs/<%- bin %>/<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version" | ||
} | ||
} | ||
}, | ||
"node": { | ||
"version": "10.4.0", | ||
"targets": [ | ||
"darwin-x64", | ||
"linux-x64", | ||
"win32-x64" | ||
] | ||
} | ||
}, | ||
"plugins": [ | ||
"@oclif/plugin-update", | ||
"@oclif/plugin-help" | ||
] | ||
}, | ||
"pkg": { | ||
"scripts": "./lib/**/*.js" | ||
}, | ||
"private": true, | ||
"repository": "jdxcode/s3-update-example-cli", | ||
"scripts": { | ||
"test": "mocha --forbid-only \"test/**/*.test.ts\"", | ||
"prepack": "rm -rf lib && tsc && oclif-dev manifest", | ||
"postpack": "rm -f oclif.manifest.json", | ||
"version": "oclif-dev readme && git add README.md" | ||
}, | ||
"types": "lib/index.d.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {Command, flags} from '@oclif/command' | ||
|
||
export default class Hello extends Command { | ||
static description = 'describe the command here' | ||
|
||
static examples = [ | ||
`$ s3-update-example-cli hello | ||
hello world from ./src/hello.ts! | ||
`, | ||
] | ||
|
||
static flags = { | ||
help: flags.help({char: 'h'}), | ||
// flag with a value (-n, --name=VALUE) | ||
name: flags.string({char: 'n', description: 'name to print'}), | ||
// flag with no value (-f, --force) | ||
force: flags.boolean({char: 'f'}), | ||
} | ||
|
||
static args = [{name: 'file'}] | ||
|
||
async run() { | ||
const {args, flags} = this.parse(Hello) | ||
|
||
const name = flags.name || 'world' | ||
this.log(`hello ${name} from ./src/commands/hello.ts`) | ||
if (args.file && flags.force) { | ||
this.log(`you input --force and --file: ${args.file}`) | ||
} | ||
} | ||
} |
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 @@ | ||
export {run} from '@oclif/command' |
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,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"importHelpers": true, | ||
"module": "commonjs", | ||
"outDir": "./lib", | ||
"pretty": true, | ||
"rootDirs": [ | ||
"./src" | ||
], | ||
"strict": true, | ||
"target": "es2017" | ||
}, | ||
"include": [ | ||
"./src/**/*" | ||
] | ||
} |
Oops, something went wrong.