-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.js
executable file
·70 lines (59 loc) · 1.87 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* grunt-init-myapp
* https://gruntjs.com/
*
* Copyright (c) 2014 Slinto - Tomas Stankovic
* @TomasStankovic
* Licensed under the MIT license.
*/
'use strict';
exports.description = 'Create a new WebApp including LESS and RequireJS.';
exports.notes = 'HELLO! Let\'s build better internet! \nThis is webApp template ' +
'LESS with LESSHAT mixins, RequireJS with r.js optimizer, jshint and livereloading';
exports.after = 'Done! \nHappy Coding!';
exports.warnOn = '*';
exports.template = function(grunt, init, done) {
init.process({type: 'myapp'}, [
init.prompt('name', 'MyApp'),
init.prompt('description'),
init.prompt('version', '0.0.1'),
init.prompt('repository'),
init.prompt('homepage'),
init.prompt('licenses', 'MIT'),
init.prompt('author_name'),
init.prompt('author_email'),
init.prompt('author_url')
], function(err, props) {
props.keywords = [];
var files = init.filesToCopy(props);
init.addLicenseFiles(files, props.licenses);
init.copyAndProcess(files, props, {noProcess: 'www/assets/**'});
// Generate package.json file, used by npm and grunt.
init.writePackageJSON('package.json', {
name: props.name,
version: props.version,
node_version: '>= 0.10.0',
devDependencies: {
'grunt': '^0.4.5',
'grunt-contrib-connect': '^0.7.1',
'grunt-contrib-copy': '^0.5.0',
'grunt-contrib-jshint': '^0.10.0',
'grunt-contrib-less': '^0.11.0',
'grunt-contrib-requirejs': '^0.4.4',
'grunt-contrib-watch': '^0.6.1',
"jit-grunt": "^0.6.0"
}
});
// Generate bower.json file, used by bower.
init.writePackageJSON('bower.json', {
name: props.name,
version: props.version,
dependencies: {
'lesshat': 'https://github.com/csshat/lesshat.git'
}
});
// All done!
done();
});
};