This repository has been archived by the owner on Oct 5, 2024. It is now read-only.
forked from EuroPython/ep2014-teaser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
99 lines (95 loc) · 2.67 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
95
96
97
98
99
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
options: {
sassDir: 'app/assets/sass',
cssDir: 'app/assets/css',
imagesDir: 'app/assets/images'
},
server: {},
dist: {
options: {
outputStyle: 'compressed'
}
}
},
copy: {
dist: {
files: [
{expand: true, cwd: 'app', src: ['assets/images/*.png', 'assets/images/*.svg', 'assets/css/*', '*.html', '*.txt'], dest: 'dist'}
]
}
},
clean: {
dist: ['dist'],
compass: ['app/assets/css/*']
},
connect: {
livereload: {
options: {
open: true
}
},
options: {
port: 9000,
base: "app",
livereload: 35729
}
},
rev: {
dist: {
src: ['dist/assets/css/*.css', 'dist/assets/images/*.png', 'dist/assets/images/*.svg']
}
},
usemin: {
html: 'dist/*.html',
css: ['dist/assets/css/*.css']
},
watch: {
compass: {
files: ['app/assets/sass/*.scss'],
tasks: ['compass:server']
},
livereload: {
options: {
livereload: '<%= connect.options.livereload %>'
},
files: [
'app/assets/css/*.css',
'app/assets/images/*',
'app/*.html'
]
}
},
concurrent: {
server: ['compass:server']
}
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-usemin');
grunt.loadNpmTasks('grunt-rev');
grunt.registerTask('default', ['server']);
grunt.registerTask('server', function(target) {
grunt.task.run([
'clean',
'concurrent:server',
'connect:livereload',
'watch'
])
});
grunt.registerTask('dist', function(target) {
grunt.task.run([
'clean',
'compass:dist',
'copy:dist',
'rev:dist',
'usemin'
]);
});
};