-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgruntfile.js
More file actions
63 lines (59 loc) · 1.81 KB
/
Copy pathgruntfile.js
File metadata and controls
63 lines (59 loc) · 1.81 KB
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
module.exports = function (grunt) {
grunt.initConfig({
concat: {
scripts: {
src: ['assets/scripts/**/*.js','bower_components/jquery/dist/jquery.js'],
dest: 'web/js/output.js',
},
styles: {
src: ['assets/styles/**/*.css'],
dest: 'web/css/output.css',
},
},
watch: {
scripts: {
files: ['assets/**/*.js'],
tasks: ['concat:scripts']
},
styles: {
files: ['assets/**/*.css'],
tasks: ['concat:styles',"cssmin"]
},
},
cssmin: {
target: {
files: [{
expand: true,
cwd: 'web/css',
src: ['*.css', '!*.min.css'],
dest: 'web/css',
ext: '.min.css'
}]
}
},
'jsmin-sourcemap': {
all: {
src: ['web/js/*.js'],
dest: 'web/js/output.min.js',
destMap: 'web/js/output.js.map'
}
},
sass: {
dist: {
files: [{
expand: true,
cwd: 'bower_components/bootstrap-sass/assets/stylesheets',
src: ['**/*.scss'],
dest: 'assets/styles',
ext: '.css'
}]
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-jsmin-sourcemap');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.registerTask('default', ["sass", 'concat', "cssmin", "jsmin-sourcemap", "watch"]);
};