Remove from code from makefile that is now handled by webpack
This commit is contained in:
parent
29bcf75470
commit
ab89f5f93f
16
Makefile
16
Makefile
@ -28,20 +28,12 @@ clean:
|
|||||||
rm -f ./bindata.go
|
rm -f ./bindata.go
|
||||||
|
|
||||||
bindata.go: client client/*
|
bindata.go: client client/*
|
||||||
rm -fr ./clientpack
|
npm run webpack
|
||||||
cp -r ./client ./clientpack
|
cat client/index.htm \
|
||||||
( echo ';(function() {' ; cat clientpack/dcwebui.js ; echo '})();' ) | uglifyjs -o clientpack/dcwebui.min.js -c -m --ie8
|
| sed -e '/bundle.js/{i <script>' -e 'r clientpack/bundle.min.js' -e 'a </script>' -e 'd}' \
|
||||||
lessc --clean-css clientpack/dcwebui.css clientpack/dcwebui.min.css
|
> clientpack/index.htm
|
||||||
cat clientpack/index.htm \
|
|
||||||
| sed -e '/dcwebui.css/{i <style>' -e 'r clientpack/dcwebui.min.css' -e 'a </style>' -e 'd}' \
|
|
||||||
| sed -e '/dcwebui.js/{i <script>' -e 'r clientpack/dcwebui.min.js' -e 'a </script>' -e 'd}' \
|
|
||||||
| 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
|
|
||||||
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
|
||||||
mv clientpack/index.min.htm clientpack/index.htm
|
mv clientpack/index.min.htm clientpack/index.htm
|
||||||
rm ./clientpack/*.js
|
|
||||||
rm ./clientpack/*.css
|
|
||||||
go-bindata -nomemcopy -nometadata -prefix clientpack clientpack
|
go-bindata -nomemcopy -nometadata -prefix clientpack clientpack
|
||||||
|
|
||||||
$(BINNAME).exe: bindata.go *.go
|
$(BINNAME).exe: bindata.go *.go
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "s",
|
"main": "s",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack && cp client/index.htm clientpack"
|
"webpack": "webpack"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Loading…
Reference in New Issue
Block a user