-
Notifications
You must be signed in to change notification settings - Fork 18
/
Gruntfile.js
55 lines (50 loc) · 1.17 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
45
46
47
48
49
50
51
52
53
54
55
var config = {
dist: 'dist',
bower: 'bower_components',
src: 'src',
banner: '/*!\n' +
' * <%= project.name %> - v<%= project.version %>\n'+
' * Copyright (c) 2015-<%= grunt.template.today("yyyy") %> <%= project.author %>\n'+
' */\n'
};
var project = require('./package.json');
module.exports = function(grunt) {
grunt.initConfig({
config: config,
project: project,
cssmin: {
add_banner: {
options: {
banner: config.banner
},
files: {
'<%= config.dist %>/github.min.css': [
'<%= config.src %>/github.css'
]
}
}
},
uglify: {
options: {
banner: config.banner
},
dist: {
files: {
'<%= config.dist %>/github.min.js': [
'<%= config.src %>/github.js'
]
}
}
},
clean: {
build: {
src: ["dist/*"]
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask( "wipe", [ "clean" ])
grunt.registerTask( "build", ["cssmin", "uglify:dist" ] );
};