It's pronounced /dah-Leh/ (the Spanish way of saying it)
One CLI to rule them all! A bunch of daily commands to help the development of our projects.
Soon...
To see commands list
$ dale
To use a specific command
$ dale COMMAND
dale build
dale clean
dale format
dale generate
dale help
dale integration
dale lint
dale reset
dale restart
dale start
dale stop
dale testcafe
dale unit
Build all containers:
$ dale b
ALIASES
$ dale b
Remove all containers:
$ dale c
OPTIONS
-i, --image Specify a image name to be removed.
ALIASES
$ dale c
Format code using Prettier:
$ dale format
ALIASES
$ dale f
Generate api files:
$ dale generate
ALIASES
$ dale g
See command's help and options
$ dale -h COMMAND
$ dale --help COMMAND
Run integration tests using Newman:
$ dale integration
ALIASES
$ dale i
Lint code using TSLint:
$ dale lint
ALIASES
$ dale l
Stop, remove and start all containers:
USAGE
$ dale reset
OPTIONS
-e, --env To use the docker-compose-env.yaml, it will start containers using an environment scenario.
-i, --image Specify a image name to be removed.
ALIASES
$ dale r
Stop and start all containers:
USAGE
$ dale restart
OPTIONS
-e, --env To use the docker-compose-env.yaml, it will start containers using an environment scenario.
ALIASES
$ dale rs
Create a network and starts all containers:
USAGE
$ dale start
OPTIONS
-e, --env To use the docker-compose-env.yaml, it will start containers using an environment scenario.
ALIASES
$ dale s
Stops all containers:
USAGE
$ dale stop
OPTIONS
-e, --env To use the docker-compose-env.yaml, it will stop containers running in an environment scenario.
ALIASES
$ dale st
Run E2E tests using Testacafe:
USAGE
$ dale testcafe
$ dale testcafe -f 'CRM'
$ dale testcafe -u=dev
ARGUMENTS
-f <fixture-name> to run a specific fixture
-t <test-name> to run a single specific test
OPTIONS
-u, --url To run TestCafe tests in different environments. Options: 'dev', 'acc' and 'prod'
ALIASES
$ dale t
Run unit tests:
$ dale unit
ALIASES
$ dale u
You can pass any Jest CLI arguments
You can override commands and settings adding a .dalerc.json
file in the root of your project:
To toggle the Dale logo:
Value Type: Boolean
{
"logo": true, // default
...
}
Color for the commands logs, it should be a one of these available colors: 'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'gray', 'grey', 'blackBright', 'redBright', 'greenBright', 'yellowBright', 'blueBright', 'magentaBright', 'cyanBright', 'whiteBright'
:
Value Type: String
Default:
{
"logColor": cyan, // default
...
}
The project's image(s) to clean or reset:
Value Type: Array<string>
{
"images": ["foo", "bar"],
...
}
Be specific with the image name or you can add just the first part, this value works with a "*" at the end i.e.:
"images": ["payon"]
it will remove payon-mock, payon-api, etc...
Commands object list. These are the available commands: 'build', 'clean', 'format', 'integration', 'lint', 'reset', 'reset-mock', 'restart', 'start', 'stop', 'testcafe', 'unit'
.
Value Type: Object { [key: string]: Array<string> }
{
"commands": {
"build": ["this is my custom build command"],
...
}
}
To run the CLI in this project you need to run its binary (from the root path):
$ bin/run
$ bin/run COMMAND
Or, with you can Npm link it (from the root path):
$ npm link
$ dale
After linking you can use dale across other projects
After you test it you should unlink it (from the root path):
$ npm unlink
$ npm run test // run all tests
$ npm run test:integration // run commands/* tests
$ npm run test:unit // run config/* and utils/* tests
$ npm run build
$ npm run format
$ npm run lint
$ npm run format && npm run lint
We are using Husky to run some commands before or after some Git commands.
Check husky
options in package.json
.
Please read our documentation about Git Commit: Writing a Commit Message and Applying Conventional Commits.
We use Commitlinnt (a tool to check if your commit messages meet the conventional commit format) integrated with Husky, so before committing the message will be linted. If it doesn't follow the Conventional Commits the commit it will be prevented.
Before committing it will run npm run format
and npm run lint
for formatting and linting the code if an error occurs the commit will fail.
Before pushing it will run npm run test
to run all tests if an error occurs the push will be prevented.
This project was built using Oclif CLI framework. Have a look at its documentation, there you will find everything that you need to create commands, hooks, plugins, etc...