-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathgrunt.js
53 lines (52 loc) · 2.44 KB
/
grunt.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
/*global module:false*/
module.exports = function(grunt) {
//Load in the coffee and css grunt machines!
grunt.loadNpmTasks('grunt-coffee'); // http://github.com/avalade/grunt-coffee
grunt.loadNpmTasks('grunt-css'); // http://github.com/jzaefferer/grunt-css
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= pkg.license %> */'
},
coffee:{
coffee:{
src: ["src/js/plugins.coffee"],
dest: 'build/js/',
options:{
bare: true
}
}
},
concat: {
dist: {
src: ['src/js/begin.js','build/js/plugins.js','src/js/end.js'],
dest: 'dist/js/<%= pkg.name %>.js'
}
},
min: {
dist: {
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
dest: 'dist/js/<%= pkg.name %>.min.js'
}
},
cssmin:{
dist:{
src:["src/css/*.css"],
dest:"dist/css/<%= pkg.name %>.min.css"
}
},
watch: {
files: ["src/*/*"],
tasks: 'coffee concat min cssmin'
}
}
);
// Default task.
grunt.registerTask('default', 'watch');
grunt.registerTask('build','coffee concat min cssmin');
};