-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathGruntfile.js
94 lines (88 loc) · 2.95 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';',
},
vendorJs: {
src: [
'bower_components/jquery-mousewheel/jquery.mousewheel.js',
'bower_components/Background-Check/background-check.js',
'bower_components/jquery.hotkeys/jquery.hotkeys.js',
'bower_components/color-thief/js/color-thief.js',
'bower_components/jquery.columnizer/src/jquery.columnizer.js',
'bower_components/hammerjs/dist/jquery.hammer.js',
'bower_components/waitForImages/dist/jquery.waitForImages.js',
'bower_components/Blur.js/blur.js',
'bower_components/jquery.avgrund/jquery.avgrund.js'
],
dest: 'assets/js/vendor.js'
},
vendorCss: {
src: [
'bower_components/jquery.avgrund/style/avgrund.css'
],
dest: 'assets/css/vendor.css'
}
},
sass: {
app: {
files: {
"assets/css/app.css": "src/sass/app.sass"
}
}
},
coffee: {
app: {
options: {
join: true,
sourceMap: true
},
files: {
'assets/js/app.js': [
'src/coffee/touch.coffee',
'src/coffee/mousewheel.coffee',
'src/coffee/keys.coffee',
'src/coffee/snapview.coffee',
'src/coffee/header.coffee',
'src/coffee/article.coffee',
'src/coffee/main.coffee',
'src/coffee/app.coffee'
]
}
}
},
watch: {
sys: {
files: ['*'],
tasks: ['build']
},
sass: {
files: ['src/sass/*.sass'],
tasks: ['sass']
},
coffee: {
files: ['src/coffee/*.coffee'],
tasks: ['coffee']
}
},
uglify: {
options: {
//mangle: false
},
dist: {
files: {
'assets/js/vendor.js': ['assets/js/vendor.js']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('build', ['sass', 'coffee', 'concat'/*, 'uglify'*/]);
grunt.registerTask('default', 'build');
};