@digi-frontend/wasl-cli
v1.1.0
Published
A powerful CLI tool for React projects to streamline development by scaffolding components, slices, utilities, and setting up essential tools like Redux, Formik, and Husky.
Readme
Wasl-CLI
A powerful CLI tool for React projects to streamline development by scaffolding components, slices, utilities, and setting up essential tools like Redux, Formik, and Husky.
Installation
npm install -g @digi-frontend/wasl-cliUsage
You can use the CLI in interactive mode by simply running:
waslOr you can use specific commands for generation and setup.
Generators
Generate boilerplate code for various project elements.
wasl generate [type]
# Alias: wasl g [type]Available Types:
| Type | Alias | Description |
|------|-------|-------------|
| component | c | Create a new React component |
| slice | s | Create a Redux Toolkit slice |
| test | t | Create a component test file |
| utility | u | Create a utility function |
Examples:
wasl generate component
wasl g sSetup Tools
Quickly configure third-party libraries and tools in your project.
wasl setup [type]
# Alias: wasl s [type]Available Types:
| Type | Alias | Description |
|------|-------|-------------|
| redux | r | Setup Redux Toolkit |
| formik | f | Setup Formik for form management |
| husky | h | Setup Husky for git hooks |
Examples:
wasl setup redux
wasl s hFeatures
Husky Integration with Jira Mapping
When setting up Husky (wasl setup husky), the CLI provides an interactive wizard to configure:
- Pre-commit Branch Naming Check: Ensures branch names follow conventions (e.g.,
feat/xxx,bugfix/xxx). - Commit Message Validation: Enforces Conventional Commits format.
- Jira Ticket Mapping: Automatically extracts Jira ticket IDs from your branch name and prepends them to your commit message.
- Supports case-insensitive matching (e.g.,
wasl-123->[WASL-123]).
- Supports case-insensitive matching (e.g.,
License
ISC
