-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
77 lines (68 loc) · 1.6 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*!
* Elise Library's gruntfile
**/
module.exports = exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: '\n\n',
banner: '/*! <%=pkg.name%>'
+'\n * @version <%=pkg.version%>'
+'\n * @release <%= grunt.template.today("yyyy-mm-dd") %>'
+'\n * @url <%=pkg.repository.url%>'
+'\n */\n\n'
},
javascript: {
src: [
'js/core.js',
'js/tip.js',
'js/alert.js',
'js/modal.js',
'js/loader.js',
'js/hope.js'
],
dest: 'dist/js/elise.js',
},
css: {
src: [
'css/core.css',
'css/tip.css',
'css/alert.css',
'css/modal.css',
'css/loader.css',
'css/hope.css'
],
dest: 'dist/css/elise.css',
}
},
uglify: {
options: {
preserveComments: 'some'
},
javascript: {
src: 'dist/js/elise.js',
dest: 'dist/js/elise.min.js'
}
},
cssmin: {
css: {
src: 'dist/css/elise.css',
dest: 'dist/css/elise.min.css'
}
},
copy: {
images: {
expand: true,
cwd: 'img/elise/',
src: '**/*',
dest: 'dist/img/elise/'
}
}
});
grunt.registerTask('default', ['concat', 'uglify', 'cssmin', 'copy']);
};