-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
48 lines (46 loc) · 1.16 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
module.exports = function(grunt) {
grunt.initConfig({
copy: {
files: {
src: ['*.html', 'images/*'],
dest: 'dist/',
filter: 'isFile'
}
},
requirejs: {
compile: {
options: {
baseUrl: './scripts',
include: [
'main', 'mineSweeper', 'mineSweeperView', 'timer', 'utility',
'jquery', 'underscore'
],
insertRequire: ['main'], // almond.js doesn't look for data-main
name: 'almond',
paths: {
'jquery': 'jquery' // uses the local version
},
out: 'dist/scripts/require.js' // should be renamed to require.js later
}
}
},
cssmin: {
options: {
roundingPrecision: -1
},
target: {
files: [{
expand: true,
cwd: 'styles',
src: '*.css',
dest: 'dist/styles/',
ext: '.css'
}]
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('default', ['copy', 'requirejs', 'cssmin']);
}