forked from publiclab/spectral-workbench.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
105 lines (93 loc) · 3.3 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
96
97
98
99
100
101
102
103
104
105
module.exports = function(grunt) {
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
options : {
livereload: true
},
source: {
files: [
'src/*.js',
'src/*/*.js',
'Gruntfile.js'
],
tasks: [ 'build:js' ]
}
},
concat: {
dist: {
src: [
'src/core/*.js',
'src/SpectralWorkbench.Importer.js',
'src/SpectralWorkbench.Image.js',
'src/SpectralWorkbench.Datum.js',
'src/SpectralWorkbench.Spectrum.js',
'src/SpectralWorkbench.Set.js',
'src/SpectralWorkbench.Tag.js',
'src/SpectralWorkbench.PowerTag.js',
'src/api/SpectralWorkbench.API.js',
'src/api/SpectralWorkbench.API.Legacy.js',
'src/api/SpectralWorkbench.API.Core.js',
'src/api/SpectralWorkbench.API.Operations.js',
'src/ui/SpectralWorkbench.UI.Spectrum.js',
'src/ui/SpectralWorkbench.UI.Set.js',
'src/ui/SpectralWorkbench.UI.ToolPaneTypes.js',
'src/ui/SpectralWorkbench.UI.ToolPane.js',
'src/ui/SpectralWorkbench.UI.SpectraPane.js',
'src/ui/SpectralWorkbench.UI.StepsPane.js',
'src/ui/SpectralWorkbench.UI.TagForm.js',
'src/ui/SpectralWorkbench.UI.Misc.js',
'src/SpectralWorkbench.Graph.js'
],
dest: 'dist/spectral-workbench.js',
}
},
jasmine: {
swb: {
src: 'dist/*.js',
options: {
specs: 'spec/javascripts/*spec.js',
vendor: [
'node_modules/jquery/dist/jquery.min.js',
'bower_components/d3/d3.js',
'bower_components/nvd3/build/nv.d3.js',
'bower_components/bootstrap-css/js/bootstrap.min.js',
'bower_components/moment/moment.js',
'node_modules/jasmine-jquery/lib/jasmine-jquery.js',
'node_modules/jasmine-ajax/lib/mock-ajax.js',
'spec/javascripts/helpers/test_responses.js'
],
page: {
viewportSize: {
width: 1200,
height: 800
}
},
styles: [
'dist/spectral-workbench.css'
]
}
}
},
tape: {
options: {
pretty: true,
output: 'console'
},
files: ['spec/tape/spectral-workbench.js']
}
});
/* Default (development): Watch files and build on change. */
grunt.registerTask('default', ['watch']);
grunt.registerTask('build', [
'concat:dist'
//'browserify:dist'
]);
grunt.registerTask('test', [
'jasmine',
'tape'
]);
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-tape');
};