The CLI can be installed globally (since version ^1.1) as well as locally in the project.
Location * | Command |
---|---|
global | npm i -g @leanup/cli@next |
local | npm i @leanup/cli@next |
Location * | Command |
---|---|
global | npm i -g @leanup/cli-<framework>@next |
local | npm i @leanup/cli-<framework>@next |
The following framework adapter are available:
Framework | Package |
---|---|
angular | @leanup/cli-angular@next |
angularjs | @leanup/cli-angularjs@next |
aurelia | @leanup/cli-aurelia@next |
inferno | @leanup/cli-inferno@next |
preact | @leanup/cli-preact@next |
react | @leanup/cli-react@next |
svelte | @leanup/cli-svelte@next |
vanilla | @leanup/cli-vanilla@next |
vuejs (v2) | @leanup/cli-vue@next |
vuejs (v3) | @leanup/cli-vue3@next |
Using the example of a global CLI for react
.
- Install die CLI
npm i -g @leanup/cli@next @leanup/cli-react@next
- Create a project folder
mkdir project-folder
- Move in project folder
cd project-folder
- Generate a
react
app inside the project-folder
react create
- Serve the app to develop
react serve --open
- Build the app artifacts to deliver
react build
- Format the code
react format --fix
- Lint the code
react lint --fix
- Run the unit-tests
react test
- Run the unit-tests with coverage watermarks
react coverage --check-coverage
- Run the e2e-tests in the chrome browser
react e2e -e chrome
- Run the e2e-tests with cucumber in the chrome browser
react cucumber -e chrome
Using the example of a global CLI for vuejs
(v3).
npm i -g @leanup/cli-vue3@next --force
mkdir project-folder
cd project-folder
vue3 create
vue3 serve --open
vue3 build
vue3 format --fix
vue3 lint --fix
vue3 test
vue3 coverage --check-coverage
vue3 e2e -e chrome
vue3 cucumber -e chrome