-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
executable file
·68 lines (61 loc) · 1.27 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
'use strict';
var LIVERELOAD_PORT = 35728;
module.exports = function (grunt) {
// Load npm plugins to provide necessary tasks.
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
// Make sure code styles are up to par and there are no obvious mistakes
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish'),
ignores: [
'Gruntfile.js'
]
},
all: {
src: [
'Gruntfile.js',
'src/**/*.js'
]
}
},
clean: {
all: ['dist/*', 'dist/**/*']
},
concat: {
options: {
separator: ';'
},
depsJs: {
files: {
'dist/dabl-js.api.js': [
'bower_components/dabl/dist/scripts/dabl.js',
'bower_components/dabl/dist/scripts/dabl.adapter.rest.js',
'bower_components/dabl/dist/scripts/dabl.adapter.rest.angular.js',
'bower_components/dabl-js-security/dist/dabl-js.security.js',
'src/main.js',
'src/services/*.js',
'src/models/Model.js'
]
}
}
},
uglify: {
depsJs: {
files: {
'dist/dabl-js.api.min.js': 'dist/dabl-js.api.js'
}
}
}
});
// Default task to be run.
grunt.registerTask('build', [
'clean',
'concat',
'uglify'
]);
grunt.registerTask('hint', [
'newer:jshint'
]);
};