0.2.0 • Published 5 years ago
@slsplus/clii v0.2.0
Serverless Plus CLI
CLI tool for Serverless Plus
Features
Usage
$ npm i @slsplus/cli -g
$ slsplus -hClone project
$ slsplus clone https://github.com/serverless-plus/cliParse serverless config file
$ slsplus parse -o -rv '{"src":"./"}'Parse command will parse serverless config file with costomize and environment variables replacement.
For example, before is:
inputs:
src:
src: ./
exclude:
- .env
region: ${env:REGION}
apigatewayConf:
protocols:
- http
- httpsIf process.env.REGION=ap-guangzhou, after parsing, the serverless.yml will be:
inputs:
src: ./
region: ap-guangzhou
apigatewayConf:
protocols:
- http
- httpsNotice: if you don't pass
-ooption, serverless.yml will not be rewrite, the parse result will just be outputed to terminal.
Environment
For auto release action, you should setup GH_TOKEN and NPM_TOKEN secrets.
Development
All git commit mesage must follow below syntax:
type(scope?): subject #scope is optionalsupport type:
- feat: add new feature
- fix: fix bug or patch feature
- ci: CI
- chore: modify config, nothing to do with production code
- docs: create or modifiy documents
- refactor: refactor project
- revert: revert
- test: test
Most of time, we just use feat and fix.
Test
For CI test, should copy .env.example to .env.test, then config below environment variables to yours:
TENCENT_SECRET_ID=xxx
TENCENT_SECRET_KEY=xxx
CODE_URL_COS=xxxNotice:
CODE_URL_COSis a cos url for project code download in CI environment.
License
MIT
0.2.0
5 years ago