-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
59 lines (59 loc) · 2.15 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
dist: {
src: [
'js/**/*.js',
'bower_components/jquery/dist/jquery.js',
'bower_components/canjs/can.jquery.js',
'bower_components/canjs/can.route.pushstate.js',
'bower_components/canjs/can.map.backup'
],
dest: 'dist.js'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'production.min.js': ['<%= concat.dist.dest %>']
}
}
},
jasmine: {
test: {
src: ['src/**/*.js', 'components/**/*.js'],
options: {
specs: ['src/**/*Spec.js', 'components/**/*Spec.js'],
helpers: ['src/**/*Helper.js', 'components/**/*Helper.js'],
host: 'http://127.0.0.1:8000/',
template: require('grunt-template-jasmine-requirejs'),
templateOptions: {
requireConfig: {
baseUrl: 'src/',
paths: {
"jquery" : "bower_components/jquery/dist/jquery",
"can": "bower_components/CanJS/amd-dev/can"
},
deps: ['jquery', 'can'],
callback: function($) {
// do initialization stuff
}
}
}
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-serve');
grunt.registerTask('default', ['concat', 'uglify']);
};