forked from tinysou/tinysou-search.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
51 lines (51 loc) · 1.51 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
compress: {
drop_console: true
}
},
jquery: {
src: ['node_modules/jquery/dist/jquery.min.js', 'deps/jquery.modal.js', 'src/jquery.tinysou.js'],
dest: 'build/jquery.tinysou.js'
},
nojquery: {
src: ['deps/jquery.modal.js', 'src/jquery.tinysou.js'],
dest: 'build/nojquery.tinysou.js'
},
zepto: {
src: ['node_modules/zepto/src/zepto.js', 'node_modules/zepto/src/ajax.js', 'node_modules/zepto/src/event.js', 'node_modules/zepto/src/form.js', 'node_modules/zepto/src/data.js', 'deps/zepto.modal.js', 'src/zepto.tinysou.js'],
dest: 'build/zepto.tinysou.js'
},
nozepto: {
src: ['node_modules/zepto/src/data.js', 'deps/zepto.modal.js', 'src/zepto.tinysou.js'],
dest: 'build/nozepto.tinysou.js'
}
},
watch: {
js: {
files: ['deps/*.js', 'src/*.js'],
tasks: ['uglify']
},
css: {
files: ['src/*.css'],
tasks: ['cssmin']
}
},
cssmin: {
css: {
src: 'src/tinysou.css',
dest:'build/tinysou.css'
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-css');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task(s).
grunt.registerTask('default', ['watch']);
};