UNPKG

2.98 kBMarkdownView Raw
1coz-tmpl
2==========
3
4<!-- Badge Start -->
5<a name="badges"></a>
6
7[![Build Status][bd_travis_shield_url]][bd_travis_url]
8[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
9[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
10[![Dependency Status][bd_gemnasium_shield_url]][bd_gemnasium_url]
11[![npm Version][bd_npm_shield_url]][bd_npm_url]
12
13[bd_repo_url]: https://github.com/coz-repo/coz-tmpl
14[bd_travis_url]: http://travis-ci.org/coz-repo/coz-tmpl
15[bd_travis_shield_url]: http://img.shields.io/travis/coz-repo/coz-tmpl.svg?style=flat
16[bd_license_url]: https://github.com/coz-repo/coz-tmpl/blob/master/LICENSE
17[bd_codeclimate_url]: http://codeclimate.com/github/coz-repo/coz-tmpl
18[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/coz-repo/coz-tmpl.svg?style=flat
19[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/coz-repo/coz-tmpl.svg?style=flat
20[bd_gemnasium_url]: https://gemnasium.com/coz-repo/coz-tmpl
21[bd_gemnasium_shield_url]: https://gemnasium.com/coz-repo/coz-tmpl.svg
22[bd_npm_url]: http://www.npmjs.org/package/coz-tmpl
23[bd_npm_shield_url]: http://img.shields.io/npm/v/coz-tmpl.svg?style=flat
24
25<!-- Badge End -->
26
27
28<!-- Description Start -->
29<a name="description"></a>
30
31Build-in templates for coz.
32
33<!-- Description End -->
34
35
36
37
38<!-- Sections Start -->
39<a name="sections"></a>
40
41<!-- Section from "docs/readme/01.Installation.md.hbs" Start -->
42
43<a name="section-docs-readme-01-installation-md"></a>
44Installation
45-----
46
47```bash
48npm install coz-tmpl --save-dev
49```
50
51<!-- Section from "docs/readme/01.Installation.md.hbs" End -->
52
53<!-- Section from "docs/readme/02.Usage.md.hbs" Start -->
54
55<a name="section-docs-readme-02-usage-md"></a>
56Usage
57-----
58
59+ [Generating index.js for a Module Directory.](#generating-index-js-for-a-module-directory-)
60+ [Generating nodeunit Test File.](#generating-nodeunit-test-file-)
61
62
63### Generating index.js for a Module Directory.
64
65`.indexJsBud(config)` defines a bud for a index.js
66
67```javascript
68var cozTmpl = require('coz-tmpl');
69
70module.exports = cozTmpl.indexJsBud({
71 dirname: __dirname,
72 desc: 'Some node module dir',
73 module: 'foo'
74});
75
76if (!module.parent) {
77 require('coz').render(__filename);
78}
79```
80
81### Generating nodeunit Test File.
82
83`.nodeunitTestJsBud(config)` defines a bud for nodeunit test file.
84
85
86```javascript
87var cozTmpl = require('coz-tmpl');
88
89module.exports = cozTmpl.nodeunitTestJsBud({
90 dest: __dirname,
91 src:__dirname + '/../lib/*.js'
92});
93
94if (!module.parent) {
95 require('coz').render(__filename);
96}
97```
98
99<!-- Section from "docs/readme/02.Usage.md.hbs" End -->
100
101
102<!-- Sections Start -->
103
104
105<!-- LICENSE Start -->
106<a name="license"></a>
107
108License
109-------
110This software is released under the [MIT License](https://github.com/coz-repo/coz-tmpl/blob/master/LICENSE).
111
112<!-- LICENSE End -->
113
114
115<!-- Links Start -->
116<a name="links"></a>
117
118Links
119------
120
121+ [coz](https://github.com/coz-repo/coz)
122
123<!-- Links End -->