-
Notifications
You must be signed in to change notification settings - Fork 13
/
Gruntfile.js
75 lines (66 loc) · 1.71 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
module.exports = function (grunt) {
grunt.initConfig({
paths: {
dist: 'client/dist/',
src: 'client/src/',
scss: 'client/src/assets/scss/',
stylesheets: 'client/src/assets/stylesheets/'
},
watch: {
sass: {
files: ['<%= paths.scss %>**/*.scss'],
tasks: ['sass:dev'],
options: {
livereload: true
}
}
},
sass: {
options: {
//compass: true,
precision: 6
},
dev: {
options: {
style: 'expanded'
},
files: {
'<%= paths.stylesheets %>application.css': ['<%= paths.scss %>application.scss']
}
},
dist: {
options: {
style: 'compressed'
},
files: {
'<%= paths.stylesheets %>application.css': ['<%= paths.scss %>application.scss']
}
}
},
concat: {
js: {
src: [
'<%= paths.src %>common/_declarations.js',
'client/libs/rx.angular.js',
'server/lexer.js',
'<%= paths.src %>**/*.js'
],
dest: '<%= paths.dist %>app.js'
}
},
uglify: {
production: {
files: {
'<%= paths.dist %>app.min.js':'<%= paths.dist %>app.js'
}
}
}
});
// I think we want to run something like https://github.com/ChrisWren/grunt-nodemon
// to to restart our node server when files change
grunt.registerTask('default', ['sass:dist', 'concat', 'uglify']);
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
};