-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
89 lines (83 loc) · 2.39 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
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-notify');
grunt.initConfig({
uglify: {
my_target: {
files: {
'app/bower.min.js': [
'app/bower_components/jquery/dist/jquery.min.js',
'app/bower_components/bootstrap/dist/js/bootstrap.min.js',
'app/bower_components/angular/angular.js',
'app/bower_components/angular-ui-router/release/angular-ui-router.min.js'
]
}
}
},
// "less"-task configuration
less: {
// production config is also available
development: {
options: {
sourceMapFilename: 'app.min.css.map', // otherwise, shit happens
compress: true,
sourceMap: true
},
files: {
// compilation.css : source.less
'app/app.min.css': 'app/app.less'
}
},
},
watch: {
// if any .less file changes in directory "public/css/" run the "less"-task.
less: {
files: ['**/*.less'],
tasks: ['less'],
options: {
// Start a live reload server on the default port 35729
livereload: false,
}
},
livereload: {
// Here we watch the files the sass task will compile to
// These files are sent to the live reload server after sass compiles to them
options: { livereload: false },
files: ['**/*.html']
},
},
connect: {
server: {
options: {
port: 8888,
// base: 'app'
}
}
},
notify: {
watch: {
options: {
title: 'Task Complete', // optional
message: 'Task completed!', //required
duration: 1
}
},
less: {
options: {
title: 'Task Complete', // optional
message: 'Task completed!', //required
duration: 1
}
}
}
});
// Default task(s).
grunt.registerTask('default', ['connect','less','watch']);
grunt.registerTask('styles', ['connect','less']);
grunt.registerTask('bower', ['uglify']);
};