1 | coz-tmpl
|
2 | ==========
|
3 |
|
4 |
|
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 |
|
26 |
|
27 |
|
28 |
|
29 | <a name="description"></a>
|
30 |
|
31 | Build-in templates for coz.
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | <a name="sections"></a>
|
40 |
|
41 |
|
42 |
|
43 | <a name="section-docs-readme-01-installation-md"></a>
|
44 | Installation
|
45 | -----
|
46 |
|
47 | ```bash
|
48 | npm install coz-tmpl --save-dev
|
49 | ```
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 | <a name="section-docs-readme-02-usage-md"></a>
|
56 | Usage
|
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
|
68 | var cozTmpl = require('coz-tmpl');
|
69 |
|
70 | module.exports = cozTmpl.indexJsBud({
|
71 | dirname: __dirname,
|
72 | desc: 'Some node module dir',
|
73 | module: 'foo'
|
74 | });
|
75 |
|
76 | if (!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
|
87 | var cozTmpl = require('coz-tmpl');
|
88 |
|
89 | module.exports = cozTmpl.nodeunitTestJsBud({
|
90 | dest: __dirname,
|
91 | src:__dirname + '/../lib/*.js'
|
92 | });
|
93 |
|
94 | if (!module.parent) {
|
95 | require('coz').render(__filename);
|
96 | }
|
97 | ```
|
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 | <a name="license"></a>
|
107 |
|
108 | License
|
109 | -------
|
110 | This software is released under the [MIT License](https://github.com/coz-repo/coz-tmpl/blob/master/LICENSE).
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 | <a name="links"></a>
|
117 |
|
118 | Links
|
119 | ------
|
120 |
|
121 | + [coz](https://github.com/coz-repo/coz)
|
122 |
|
123 |
|