-
Notifications
You must be signed in to change notification settings - Fork 3
#10: Migrate to oclif #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
FabyoSK
wants to merge
1
commit into
main
Choose a base branch
from
#10
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,11 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| indent_style = space | ||
| indent_size = 2 | ||
| charset = utf-8 | ||
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = false |
This file contains hidden or 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 @@ | ||
| /dist |
This file contains hidden or 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,10 @@ | ||
| { | ||
| "extends": [ | ||
| "oclif", | ||
| "oclif-typescript" | ||
| ], | ||
| "rules": { | ||
| "semi": ["error", "always"], | ||
| "object-curly-spacing": ["error", "always"] | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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,12 @@ | ||
| { | ||
| "require": [ | ||
| "test/helpers/init.js", | ||
| "ts-node/register" | ||
| ], | ||
| "watch-extensions": [ | ||
| "ts" | ||
| ], | ||
| "recursive": true, | ||
| "reporter": "spec", | ||
| "timeout": 60000 | ||
| } |
This file contains hidden or 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,36 +1,100 @@ | ||
| [](https://badge.fury.io/js/@chuva.io%2Fless-cli) | ||
|
|
||
|
|
||
| `less-cli` is a CLI tool that allows you to deploy your Less projects to AWS while providing several other tools to facilitate your interaction with Less. | ||
|
|
||
| - [Learn about Less](https://chuva-io.notion.site/Less-44d98337e08a46af934364700da05e3a) | ||
| - [Less developer documentation](https://chuva-io.notion.site/Developer-documentation-ddbab90913494721b58eca81b3fb7552) | ||
|
|
||
| <!-- toc --> | ||
| * [Usage](#usage) | ||
| * [Commands](#commands) | ||
| <!-- tocstop --> | ||
| # Usage | ||
| <!-- usage --> | ||
| ```sh-session | ||
| $ npm install -g @chuva.io/less-cli | ||
| $ less-cli COMMAND | ||
| running command... | ||
| $ less-cli (--version) | ||
| @chuva.io/less-cli/1.0.0-beta.5 darwin-x64 node-v16.20.0 | ||
| $ less-cli --help [COMMAND] | ||
| USAGE | ||
| $ less-cli COMMAND | ||
| ... | ||
| ``` | ||
| <!-- usagestop --> | ||
| *Note: Before deploying your project make sure to `export` your `LESS_TOKEN`.* | ||
|
|
||
| ```bash | ||
| $ export LESS_TOKEN=your-less-token | ||
| ``` | ||
|
|
||
| # Commands | ||
| <!-- commands --> | ||
| * [`less-cli deploy PROJECTNAME`](#less-cli-deploy-projectname) | ||
| * [`less-cli help [COMMANDS]`](#less-cli-help-commands) | ||
| * [`less-cli template add`](#less-cli-template-add) | ||
|
|
||
| ## `deploy` | ||
| ## `less-cli deploy PROJECTNAME` | ||
|
|
||
| The `deploy` command allows you to deploy your Less project to AWS. | ||
| Deploy your less project | ||
|
|
||
| *Note: Before deploying your project make sure to `export` your `LESS_TOKEN`.* | ||
| ``` | ||
| USAGE | ||
| $ less-cli deploy PROJECTNAME | ||
|
|
||
| ```bash | ||
| $ export LESS_TOKEN=your-less-token | ||
| $ less-cli deploy <projectName> | ||
| ARGUMENTS | ||
| PROJECTNAME Name of your project | ||
|
|
||
| DESCRIPTION | ||
| Deploy your less project | ||
|
|
||
| EXAMPLES | ||
| $ less-cli deploy my-awesome-api | ||
| ``` | ||
|
|
||
| ### Parameters | ||
| _See code: [dist/commands/deploy/index.ts](https://github.com/chuva-io/less-cli/blob/v1.0.0-beta.5/dist/commands/deploy/index.ts)_ | ||
|
|
||
| `<projectName>` | ||
| The name of your Less project. | ||
| ## `less-cli help [COMMANDS]` | ||
|
|
||
| *Note: Supports alphanumeric characters and "-".* | ||
| Display help for less-cli. | ||
|
|
||
| ``` | ||
| USAGE | ||
| $ less-cli help [COMMANDS] [-n] | ||
|
|
||
| ARGUMENTS | ||
| COMMANDS Command to show help for. | ||
|
|
||
| FLAGS | ||
| -n, --nested-commands Include all nested commands in the output. | ||
|
|
||
| DESCRIPTION | ||
| Display help for less-cli. | ||
| ``` | ||
|
|
||
| _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.19/src/commands/help.ts)_ | ||
|
|
||
| ## `less-cli template add` | ||
|
|
||
| Use templates to help you get your boilerplate code set up for common tasks. | ||
|
|
||
| ```bash | ||
| $ export LESS_TOKEN=your-less-token | ||
| $ less-cli deploy invoice-microservice | ||
| ``` | ||
| USAGE | ||
| $ less-cli template add [-n <value>] | ||
|
|
||
| --- | ||
| FLAGS | ||
| -n, --name=<value> The template you want to add. Options are "mongodb-js-shared-client". | ||
|
|
||
| DESCRIPTION | ||
| Use templates to help you get your boilerplate code set up for common tasks. | ||
|
|
||
| EXAMPLES | ||
| $ less-cli template add --name awesome-template | ||
| ``` | ||
|
|
||
| Do more with Less. | ||
| _See code: [dist/commands/template/add.ts](https://github.com/chuva-io/less-cli/blob/v1.0.0-beta.5/dist/commands/template/add.ts)_ | ||
| <!-- commandsstop --> | ||
| Do more with Less. | ||
| 🇨🇻 | ||
This file contains hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 | ||
|
|
||
| const oclif = require('@oclif/core') | ||
|
|
||
| oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle')) |
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.