catalyst cli
npm install @emmar/catalyst-cli``bash`install the package as a dev dependency
npm install --save-dev @emmar/catalyst-cli
Add npm script to package.json file
`json`
...
scripts: {
"catalyst": "catalyst"
}
...
`bashexecute the init command
this will create a catalyst folder at the root of your project
the folder will contain a config file and boilerplate for entity additions
npm run catalyst init
Example:
|-- package.json
|-- catalyst
|-- catalyst-cli.config.json
|-- boilerplate
|-- model
|-- sample.ts
|-- service
|-- example.ts
Config file is read from catalyst/catalyst-cli.config.json
| Key | Description |
| --------------------- | ---------------------------------------------------- |
| modelTemplateFileName | Template file name of the Model Class |
| pathParts | Key = source folder name (catalyst/{folder name}) and array of path parts points to destination folder. |
| fileNameCasing | String casing to use for file names |
| classNameCasing | String casing to use for class names |
| propertyCasing | String casing to use for class properties |
| Name | Example |
| ------ | ----------------- |
| snake | string_snake_case |
| kebab | string-kebab-case |
| camel | stringCamelCase |
| pascal | StringPascalCase |
| upper | STRINGUPPERCASE |
| lower | stringlowercase |