-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
76 lines (60 loc) · 1.9 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
/*jslint nomen: true, todo: true */
/*global module */
/* Grunt
* ============================================================================== */
module.exports = function (grunt) {
'use strict';
require('time-grunt')(grunt);
var moduleName = "settings";
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
/* Closure
* ---------------------------------------------------------------------- */
connect: {
server: {
options: {
hostname: '*',
port: 8888
}
}
},
watch: {
options: {
livereload: true
},
js: {
files: ['src/js/**/*.js'],
tasks: ['build']
}
},
preprocess: {
supercharger: {
src: 'src/js/backbone-supercharger.js',
dest: 'dist/backbone-supercharger.js'
}
},
radioPkg: grunt.file.readJSON('bower_components/backbone.radio/package.json'),
meta: {
version: '<%= radioPkg.version %>',
banner: '// Backbone.Radio v<%= meta.version %>\n'
},
template: {
options: {
data: {
version: '<%= meta.version %>'
}
},
supercharger: {
src: '<%= preprocess.supercharger.dest %>',
dest: '<%= preprocess.supercharger.dest %>'
}
}
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-preprocess');
grunt.loadNpmTasks('grunt-template');
grunt.registerTask('default', ['build', 'connect', 'watch']);
grunt.registerTask('build', ['preprocess', 'template']);
};