1.0.6 • Published 7 months ago

templater-cli v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

Templater CLI

Templater is a simple command line tool for managing and generating files from templates.

Installation

npm install templater-cli --save-dev

Usage

templater <command> [options]

Commands

  • add | a \ - add a new template
  • create | c \ - create files from template
  • init | i - initialize configuration file
  • list | l - show all templates
  • remove | r \ - remove a template

Options

  • --config | -c \ - specify the config file (default: templater.json)
  • --output | -o \ - specify the output directory (only for create command)

Config file

{
  "templatesPath": "./templates",
  "filesCase": "kebab",
  "templates": [
    {
      "name": "ui",
      "description": "ui components",
      "templatePath": "./ui",
      "outputPath": "./src/shared/ui",
      "replaceRules": [
        {
          "keyword": "__name__",
          "case": "pascal"
        }
      ]
    }
  ]
}
  • templatesPath - path to templates directory (default: ./templates)
  • filesCase - case of the generated files
  • templates - templates rules array:
    • name - template name
    • description - template description
    • templatePath - path to template directory
    • outputPath - path to output directory
    • replaceRules - replace rules array:
      • keyword - keyword to replace
      • case - case of the keyword

Available cases

  • camel - camelCase
  • kebab - kebab-case
  • pascal - PascalCase
  • snake - snake_case
  • upper - UPPER_CASE
  • lower - lowercase
1.0.6

7 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.1.0

1 year ago