forked from DanielePalombo/angular_devise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
executable file
·89 lines (79 loc) · 2.28 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
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
version: '<%= pkg.version %>',
banner:
'// AngularDevise\n' +
'// -------------------\n' +
'// v<%= pkg.version %>\n' +
'//\n' +
'// Copyright (c)<%= grunt.template.today("yyyy") %> Justin Ridgewell\n' +
'// Distributed under MIT license\n' +
'//\n' +
'// https://github.com/cloudspace/angular_devise\n' +
'\n'
},
preprocess: {
build: {
files: {
'lib/devise.js' : 'src/build/devise.js'
}
}
},
uglify : {
options: {
banner: "<%= meta.banner %>"
},
core : {
src : 'lib/devise.js',
dest : 'lib/devise-min.js',
}
},
jshint: {
options: {
jshintrc : '.jshintrc'
},
devise : [ 'src/*.js' ],
test : [ 'test/*.js', 'test/specs/*.js' ],
},
plato: {
devise : {
src : 'src/*.js',
dest : 'reports',
options : {
jshint : false
}
}
},
ngmin: {
dist: {
src: 'lib/devise.js',
dest: 'lib/devise.js'
}
},
karma: {
options: {
configFile: 'karma.conf.js',
browsers: ['PhantomJS']
},
unit: {
},
continuous: {
singleRun: false
}
}
});
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
// Default task.
grunt.registerTask('lint-test', 'jshint:test');
grunt.registerTask('test', function(type) {
type = type || 'unit';
grunt.task.run('karma:' + type);
});
grunt.registerTask('travis', ['jshint:devise', 'karma']);
grunt.registerTask('default', ['jshint:devise', 'test', 'preprocess', 'ngmin', 'uglify']);
};