forked from statesman/meme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
57 lines (49 loc) · 1.38 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
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
// Empty directories before build process
clean: {
css: ["dist/*.css", "dist/*.css.map"],
js: ["dist/*.js", "dist/*.js.map"]
},
// Use Uglify to bundle up a pym file for the home page
uglify: {
options: {
sourceMap: true
},
homepage: {
files: {
'dist/scripts.js': [
'source/javascripts/vendor/jquery.js',
'source/javascripts/vendor/underscore.js',
'source/javascripts/vendor/backbone.js',
'source/javascripts/main.js',
'source/javascripts/models/meme.js',
'source/javascripts/views/meme-canvas.js',
'source/javascripts/views/meme-editor.js',
'source/javascripts/helpers/font-monitor.js',
'source/javascripts/settings.js'
]
}
}
},
// Transpile SASS
sass: {
dist: {
options: {
style: 'compressed',
compass: true
},
files: {
'dist/styles.css': 'source/stylesheets/main.scss'
}
}
}
});
// Load the task plugins
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', ['clean', 'sass', 'uglify']);
};