-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
44 lines (39 loc) · 1.11 KB
/
Gruntfile.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
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
scripts: {
options: {
separator: '\n',
stripBanners: true,
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %> */\n',
},
src: ['./lib/morn.define.js', './lib/*.js'],
dest: './dist/morn.js'
},
style: {
src: ['./css/main.css', './css/*.css'],
dest: './dist/morn.css'
}
},
watch: {
scripts: {
files: ['./lib/*.js'],
tasks: 'concat:scripts'
},
style: {
files: ['./css/*.css'],
tasks: 'concat:style'
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.event.on('watch', function(action, filepath, target) {
grunt.log.writeln(target + ': ' + filepath + ' has ' + action);
});
grunt.registerTask('default', ['watch:scripts']);
grunt.registerTask('css', ['watch:style']);
grunt.registerTask('cat', ['concat:style']);
};