-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
52 lines (51 loc) · 1.49 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
module.exports = function(grunt) {
grunt.initConfig ({
pkg: grunt.file.readJSON('package.json'),
browserify: {
dist: {
files: {
'public/bundle.js' : ['src/Main.js']
}
}
},
stylus: {
compile: {
files: {
'public/styles/style.css' : 'public/styles/style.styl'
}
}
},
watch: {
scripts: {
files: ['src/**/*.js'],
tasks: ['browserify', 'concat']
},
css: {
files: ['public/styles/style.styl'],
tasks: ['stylus']
}
},
uglify: {
my_target: {
files: {
'public/bundle.min.js' : ['public/bundle.js']
}
}
},
concat: {
dist: {
src: ['public/lib/MIDI.js/build/MIDI.min.js', 'public/lib/MIDI.js/inc/base64binary.js', 'public/lib/MIDI.js/inc/jasmid/midifile.js', 'public/lib/MIDI.js/inc/jasmid/stream.js',
'public/lib/MIDI.js/inc/jasmid/replayer.js', 'public/lib/three.min.js', 'public/lib/Detector.js',
'public/bundle.js', 'public/lib/tween.min.js', 'public/lib/bootstrap.min.js', 'public/lib/TrackballControls.js'],
dest: 'public/build.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', 'watch');
};