build: replace minipack shell script with sed commands
This commit is contained in:
parent
a109e2dc29
commit
41e244c255
7
Makefile
7
Makefile
@ -33,10 +33,11 @@ bindata.go: client client/*
|
|||||||
cp -r ./client ./clientpack
|
cp -r ./client ./clientpack
|
||||||
( echo ';(function() {' ; cat clientpack/dcwebui.js ; echo '})();' ) | uglifyjs -o clientpack/dcwebui.min.js -c -m --ie8
|
( echo ';(function() {' ; cat clientpack/dcwebui.js ; echo '})();' ) | uglifyjs -o clientpack/dcwebui.min.js -c -m --ie8
|
||||||
lessc --clean-css clientpack/dcwebui.css clientpack/dcwebui.min.css
|
lessc --clean-css clientpack/dcwebui.css clientpack/dcwebui.min.css
|
||||||
|
#./minipack style dcwebui.css clientpack/dcwebui.min.css
|
||||||
cat clientpack/index.htm \
|
cat clientpack/index.htm \
|
||||||
| ./minipack style dcwebui.css clientpack/dcwebui.min.css \
|
| sed -e '/dcwebui.css/{i <style>' -e 'r clientpack/dcwebui.min.css' -e 'a </style>' -e 'd}' \
|
||||||
| ./minipack script dcwebui.js clientpack/dcwebui.min.js \
|
| sed -e '/dcwebui.js/{i <script>' -e 'r clientpack/dcwebui.min.js' -e 'a </script>' -e 'd}' \
|
||||||
| ./minipack script socket.io-1.7.2.js clientpack/socket.io-1.7.2.js \
|
| sed -e '/socket.io-1.7.2.js/{i <script>' -e 'r clientpack/socket.io-1.7.2.js' -e 'a </script>' -e 'd}' \
|
||||||
> clientpack/index.packed.htm
|
> clientpack/index.packed.htm
|
||||||
mv clientpack/index.packed.htm clientpack/index.htm
|
mv clientpack/index.packed.htm clientpack/index.htm
|
||||||
html-minifier --collapse-whitespace -o clientpack/index.min.htm clientpack/index.htm
|
html-minifier --collapse-whitespace -o clientpack/index.min.htm clientpack/index.htm
|
||||||
|
Loading…
Reference in New Issue
Block a user