-
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.
- Loading branch information
Showing
26 changed files
with
7,106 additions
and
463 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,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 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 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 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,12 @@ | ||
{ | ||
"require": [ | ||
"test/helpers/init.js", | ||
"ts-node/register" | ||
], | ||
"watch-extensions": [ | ||
"ts" | ||
], | ||
"recursive": true, | ||
"reporter": "spec", | ||
"timeout": 60000 | ||
} |
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,36 +1,100 @@ | ||
[![npm version](https://badge.fury.io/js/@chuva.io%2Fless-cli.svg)](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 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 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 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 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
Oops, something went wrong.