JSPM

  • Created
  • Published
  • Downloads 1549
  • Score
    100M100P100Q110318F
  • License

Flexible generator, which makes your project clean and maintainable.

Package Exports

  • coz

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (coz) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

coz

Flexible generator, which makes your project clean and maintainable.

Build Status Code Climate Code Coverage dependencies npm version Gratipay

Table of Contents

About coz

What's this?

The basic idea of coz is that creating files from files.

  • Writing a meta file called .bud file.
  • Running coz render command will generate files.

What For?

Example Usages.

  • Generate Javascript and Python code from database definition.
  • Generate package.json and bower.json sharing same meta data.

Why This?

  • Lightweight and fast

  • Unopinionated and flexible

  • Simple and extensible Getting started


Requirements

Installation

coz is available as an [NPM][npm_url] package.

$ npm install coz -g

Specifications

Bud file specification.

A bud contains file meta data like witch template to use, where to render it, what permission to give, and so on.

You can specify bud data by writing .bud file, which is actually a javascript file and could be written nodejs format.

module.exports = {
    path: 'my_file.txt',
    tmpl: '.my_file.txt.hbs',
    data: require('./.my_data')
}

And bud could be an array like:

module.exports = [
    {path: 'my_file.txt', /*...*/},
    {path: 'my_other_file.txt', /*...*/},
]

Or an async function.

module.exports = function(callback){
    myAsync(function(data){
        var error = null;
        callback(err, data);
    });
}
Supported properties
Name Type Description

Tutorials

Documents

Reports

License

This software is released under the MIT License.

About this project

Author

Donation

Support this project and others by okunishinishi via gratipay.

Support via Gratipay