-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.js
36 lines (25 loc) · 864 Bytes
/
template.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'use strict';
// Basic template description.
exports.description = 'Create a commonjs module, including Nodeunit unit tests.';
// Template-specific notes to be displayed before question prompts.
exports.notes = '';
// Template-specific notes to be displayed after question prompts.
exports.after = '创建成功'
// Any existing file or directory matching this wildcard will cause a warning.
// exports.warnOn = '*';
// The actual init template.
exports.template = function(grunt, init, done) {
init.process({}, [
// Prompt for these values.
init.prompt('name'),
init.prompt('description'),
], function(err, props) {
console.log(props);
// Files to copy (and process).
var files = init.filesToCopy(props);
// Actually copy (and process) files.
init.copyAndProcess(files, props);
// All done!
done();
});
};