@kaveenr/acchuwa
Acchuwa quick and dirty templating
Last updated 4 months ago by kaveenr .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kaveenr/acchuwa 
SYNC missed versions from official npm registry.

අච්චුව / Acchuwa

Acchuwa quick and dirty templating based on handlebars.

The project name Acchuwa, is the Sinhala word "අච්චුව" which translates to template

oclif

CLI Usage

$ acchuwa --help [COMMAND]
Acchuwa quick and dirty templating

USAGE
  $ acchuwa [CONFIG_FILE]

OPTIONS
  -h, --help     show CLI help
  -v, --version  show CLI version

Quick Start Example

In the examples folder is given a letters example which batch generates text files with parameters given in the acchuwa config.

  1. Install acchuwa
    npm install -g @kaveenr/acchuwa
    
  2. Clone repository and navigate into the repository.
    git clone https://github.com/kaveenr/acchuwa
    
    cd acchuwa
    
  3. Run the example.
    acchuwa examples/letters/acchuwa.conf.json
    

If you observe the example directory, files will be generated to the configured folder.

tree examples/letters 
examples/letters
├── acchuwa.yaml
├── gen
│   ├── letter-for-john-hammond.txt
│   ├── letter-for-මංගලිකා.txt
│   ├── letter-for-සමන්.txt
│   └── letters.txt
├── letter.txt.hbs
└── overview.txt.hbs

1 directory, 7 files

Example Acchuwa Config

Acchu configurations are written in YAML. A single configuration file can contain multiple templates that will be run against given parameter groups.

acchuwa: 1.1.0
templates:
  Generate letters on Acchuwa:
    file: letter.txt.hbs
    outputDirectory: gen/
    outFileTemplate: letter-for-{{kebabCase name}}.txt
  Generate letters overview:
    file: overview.txt.hbs
    outputDirectory: gen/
    parameterScope: global
    outFileTemplate: letters.txt
parameters:
- name: John Hammond
- name: මංගලිකා
- name: සමන්

Current Tags

  • 1.2.0                                ...           latest (4 months ago)

5 Versions

  • 1.2.0                                ...           4 months ago
  • 1.1.0                                ...           4 months ago
  • 1.0.0                                ...           4 months ago
  • 0.0.2                                ...           4 months ago
  • 0.0.1                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (16)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |