forked from oTranscribe/oTranscribe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·35 lines (27 loc) · 959 Bytes
/
Makefile
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
build_dev:
$(MAKE) compile_static
# empty manifest
cp src/manifest-dev.appcache dist/manifest.appcache
echo "# Updated $(shell date +%x_%H:%M:%S:%N)" >> dist/manifest.appcache
# run webpack
./node_modules/webpack/bin/webpack.js --watch -d
compile_static:
# clear out existing dist folder
rm -rf ./dist
mkdir ./dist
# compile l10n files
for f in src/l10n/*.ini; do (cat "$${f}"; echo) >> dist/data.ini; done
# copy over static assets
cp -r src/img src/opensource.htm src/help.htm src/privacy.htm dist/
cp ./node_modules/jakecache/dist/jakecache.js ./node_modules/jakecache/dist/jakecache-sw.js dist/
mkdir dist/help
mv dist/help.htm dist/help/index.html
mkdir dist/privacy
mv dist/privacy.htm dist/privacy/index.html
build_prod:
$(MAKE) compile_static
# manifest
cp -r src/manifest.appcache dist/
echo "# Updated $(shell date +%x_%H:%M:%S:%N)" >> dist/manifest.appcache
# run webpack
./node_modules/webpack/bin/webpack.js -p