-
Notifications
You must be signed in to change notification settings - Fork 6
/
Gruntfile.js
67 lines (62 loc) · 1.47 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
module.exports = function(grunt) {
grunt.initConfig ({
pkg: grunt.file.readJSON('package.json'),
watch: {
options: {
livereload: true,
interrupt: true
},
sass: {
files: ['assets/scss/*.scss'],
tasks: ['sass'],
options: {
spawn: false
}
}
},
sass: {
dev: {
options: {
style: 'expanded'
},
files: {
'assets/css/application.css': 'assets/scss/application.scss'
}
}
},
connect: {
server: {
options: {
port: 8080,
hostname: '*',
livereload: true
}
}
}, concat: {
options: {
separator: ';\n',
},
build: {
src: ['assets/js/mustache.js', 'assets/js/jquery-1.11.3.min.js', 'assets/js/index.js'],
dest: 'assets/js/application.js'
}
}, uglify: {
options: {
mangle: false
},
my_target: {
files: {
'assets/js/application.min.js': ['assets/js/application.js']
}
}
}
});
// Load dependencies
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', [ 'sass:dev', 'connect', 'watch' ]);
grunt.registerTask('build', [ 'sass:build', 'concat:build', 'uglify' ]);
};