-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
118 lines (94 loc) · 3.19 KB
/
Gruntfile.coffee
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
106
107
108
109
110
111
112
113
114
115
116
117
118
module.exports = ->
@initConfig
pkg: @file.readJSON 'package.json'
coffee:
build:
expand: yes
flatten: no
cwd: 'src/'
src: ['**/*.coffee']
dest: 'public/js/'
ext: '.js'
###
copy:
main:
files: [
{
expand: no
cwd: 'public/'
src: [
'components/threejs/examples/textures'
'components/threejs/examples/models'
]
dest: '.'
}
]
###
concat:
options:
stripBanners: yes
#banner: """/*! <%= pkg.name %> - v<%= pkg.version %> -
# <%= grunt.template.today("yyyy-mm-dd") %> */"""
vendors:
src: [
'components/threejs/build/three.js'
# CONSTRUCTIVE GEOMETRY
'components/ThreeCSG/ThreeCSG.js'
# STATS AND WEBGL DETECTOR
'components/stats.js/build/stats.min.js'
'components/threejs/examples/js/Detector.js'
# DAT.GUI
'components/dat-gui/build/dat.color.js'
'components/dat-gui/build/dat.gui.js'
# CONTROLS
'components/threejs/examples/js/controls/TrackballControls.js'
# POST-PROCESSING
'components/threejs/examples/js/postprocessing/EffectComposer.js'
'components/threejs/examples/js/postprocessing/RenderPass.js'
'components/threejs/examples/js/postprocessing/BloomPass.js'
'components/threejs/examples/js/postprocessing/ShaderPass.js'
'components/threejs/examples/js/postprocessing/MaskPass.js'
'components/threejs/examples/js/postprocessing/SavePass.js'
# SHADERS
'components/threejs/examples/js/shaders/BleachBypassShader.js'
'components/threejs/examples/js/shaders/ConvolutionShader.js'
'components/threejs/examples/js/shaders/CopyShader.js'
'components/threejs/examples/js/shaders/HorizontalTiltShiftShader.js'
'components/threejs/examples/js/shaders/HorizontalBlurShader.js'
'components/threejs/examples/js/shaders/VerticalBlurShader.js'
'components/threejs/examples/js/shaders/LuminosityShader.js'
'components/threejs/examples/js/shaders/NormalMapShader.js'
'components/threejs/examples/js/shaders/VerticalTiltShiftShader.js'
# SHADER TERRAIN
'components/threejs/examples/js/ShaderTerrain.js'
# PHYSIC ENGINE
'components/cannon.js/build/cannon.js'
'public/js/model.js'
'public/js/app.js'
]
dest: 'public/js/autoverse.js'
uglify:
options: mangle: no
#vendor:
# files: 'lib/logger.min.js': 'lib/logger.js'
watch:
coffee:
files: [ 'src/**/*.coffee' ]
tasks: [ 'build' ]
options: debounceDelay: 250
bgShell:
_defaults: bg: no
@loadNpmTasks 'grunt-contrib-uglify'
@loadNpmTasks 'grunt-contrib-coffee'
@loadNpmTasks 'grunt-contrib-watch'
@loadNpmTasks 'grunt-contrib-concat'
@loadNpmTasks 'grunt-contrib-copy'
@loadNpmTasks 'grunt-bg-shell'
@registerTask 'build', [
'coffee'
#'copy'
'concat'
]
@registerTask 'default', [
'build'
]