forked from katspaugh/wavesurfer.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (22 loc) · 663 Bytes
/
Makefile
File metadata and controls
27 lines (22 loc) · 663 Bytes
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
# npm install -g uglify-js
MIN=build/wavesurfer.min.js
AMD=build/wavesurfer.amd.js
CJS=build/wavesurfer.cjs.js
SOURCE_MAP=build/wavesurfer-js-map.json
SOURCE_MAP_ROOT=/
SOURCES=src/wavesurfer.js\
src/webaudio.js\
src/drawer.js\
src/drawer.*.js
$(MIN): $(SOURCES)
uglifyjs --lint -cm -o $@ $^ \
--source-map=$(SOURCE_MAP) --source-map-root=$(SOURCE_MAP_ROOT) \
--source-map-url=$(SOURCE_MAP_ROOT)$(SOURCE_MAP)
amd: $(SOURCES)
echo "define(function () {" > $(AMD)
uglifyjs $^ -cm >> $(AMD)
echo "\n;return WaveSurfer; });" >> $(AMD)
cjs: $(SOURCES)
cat $^ >> $(CJS)
echo "\nmodule.exports = WaveSurfer;" >> $(CJS)
.PHONY: amd cjs