-
Notifications
You must be signed in to change notification settings - Fork 5
/
Gruntfile.js
95 lines (87 loc) · 2.61 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
90
91
92
93
94
95
module.exports = function (grunt) {
var allSrcFiles = [
'src/Compat.js',
'src/Backshift.js',
'src/Backshift.Class.js',
'src/Backshift.Class.Configurable.js',
'src/Backshift.Math.js',
'src/Backshift.Stats.js',
'src/Backshift.Utilities.Url.js',
'src/Backshift.Utilities.RpnToJexlConverter.js',
'src/Backshift.Utilities.RpnEvaluator.js',
'src/Backshift.Utilities.Consolidator.js',
'src/Backshift.Utilities.RrdGraphVisitor.js',
'src/Backshift.Utilities.RrdGraphConverter.js',
'src/Backshift.Graph.js',
'src/Backshift.DataSource.js',
'src/Backshift.DataSource.SineWave.js',
'src/Backshift.DataSource.OpenNMS.js',
'src/Backshift.DataSource.NRTG.js',
'src/Backshift.Legend.js',
'src/Backshift.Legend.Rickshaw.js',
'src/Backshift.Graph.Matrix.js',
'src/Backshift.Graph.Flot.js',
'src/Backshift.Graph.Rickshaw.js',
'src/Backshift.Graph.C3.js',
'src/Backshift.Graph.DC.js'
];
// Minimal set of files required for support in OpenNMS
var onmsSrcFiles = [
'src/Compat.js',
'src/Backshift.js',
'src/Backshift.Class.js',
'src/Backshift.Class.Configurable.js',
'src/Backshift.Utilities.RpnToJexlConverter.js',
'src/Backshift.Utilities.RpnEvaluator.js',
'src/Backshift.Utilities.Consolidator.js',
'src/Backshift.Utilities.RrdGraphVisitor.js',
'src/Backshift.Utilities.RrdGraphConverter.js',
'src/Backshift.Graph.js',
'src/Backshift.Graph.Flot.js',
'src/Backshift.DataSource.js',
'src/Backshift.DataSource.OpenNMS.js',
'src/Backshift.DataSource.NRTG.js',
'src/Loaded.js'
];
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
mangle: false,
banner: '/*! <%= pkg.name %> <%= pkg.version %> - built on <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: allSrcFiles,
dest: 'dist/<%= pkg.name %>.min.js'
},
onmsBuild: {
src: onmsSrcFiles,
dest: 'dist/<%= pkg.name %>.onms.min.js'
}
},
concat: {
build: {
src: allSrcFiles,
dest: 'dist/<%= pkg.name %>.js'
},
onmsBuild: {
src: onmsSrcFiles,
dest: 'dist/<%= pkg.name %>.onms.js'
}
},
jsdoc: {
build: {
src: ['src/*.js'],
options: {
destination: 'dist/doc'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-jsdoc');
// Default task(s).
grunt.registerTask('default', ['uglify', 'concat', 'jsdoc']);
};