-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.js
52 lines (32 loc) · 1.12 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
'use strict';
/*
var http = require('http');
var fs = require('fs');
var file = fs.createWriteStream("test.txt");
var request = http.get("https://raw.github.com/bernatfortet/grunt-init-basement/master/root/app/styles/style-global.less", function(response) {
response.pipe(file);
});
*/
// Basic template description.
exports.description = 'Create a website basement structure.';
// Template-specific notes to be displayed before question prompts.
exports.notes = 'This template creates a website basement structure';
// Template-specific notes to be displayed after question prompts.
exports.after = 'God bless you son, you are now ready!';
// 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('title'),
], function(err, props) {
// Files to copy (and process).
var files = init.filesToCopy(props);
// Actually copy (and process) files.
init.copyAndProcess(files, props);
// All done!
done();
});
};