0.1.2 • Published 4 years ago

@emmar/catalyst-cli v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Catalyst CLI

A cli for catalyst entity generation.

Quick Start

# install the package as a dev dependency
npm install --save-dev @emmar/catalyst-cli

Add npm script to package.json file

...
scripts: {
    "catalyst": "catalyst"
}
...
# execute 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

# to add an entity - execute the add command
npm run catalyst add {{entityName}}

Boilerplate

The init command will create a /catalyst/boilerplate directory at the base of your project. Create directories under the boilerplate directory - the underlying files will be copied to your project during the add command execution. ONLY the directories listed under the pathParts configuration value will be copied.

Example:

|-- package.json
|-- catalyst
    |-- catalyst-cli.config.json
    |-- boilerplate
        |-- model
            |-- sample.ts
        |-- service
            |-- example.ts

Configuration

Config file is read from catalyst/catalyst-cli.config.json

KeyDescription
modelTemplateFileNameTemplate file name of the Model Class
pathPartsKey = source folder name (catalyst/{folder name}) and array of path parts points to destination folder.
fileNameCasingString casing to use for file names
classNameCasingString casing to use for class names
propertyCasingString casing to use for class properties

Casing

NameExample
snakestring_snake_case
kebabstring-kebab-case
camelstringCamelCase
pascalStringPascalCase
upperSTRINGUPPERCASE
lowerstringlowercase
0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago