dev(static-files): new way of building static files
This commit is contained in:
parent
bc67143575
commit
ac490e81d9
2 changed files with 43 additions and 18 deletions
22
Makefile
22
Makefile
|
|
@ -5,10 +5,6 @@ SHELL = /bin/bash
|
|||
# set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
|
||||
OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
|
||||
|
||||
NODE_PATH=./node_modules
|
||||
WEBPACK=./node_binaries/webpack
|
||||
GRUNT=./node_binaries/grunt
|
||||
|
||||
.PHONY: clean
|
||||
## Cleanup compiled and cache py files
|
||||
clean:
|
||||
|
|
@ -86,22 +82,12 @@ docs-cleanup:
|
|||
|
||||
.PHONY: web-build
|
||||
## Build JS packages static/js
|
||||
# https://hub.docker.com/r/huli/grunt
|
||||
web-build:
|
||||
NODE_PATH=$(NODE_PATH) $(GRUNT)
|
||||
docker run -it --rm -v $(PWD):/project --workdir=/project rhodecode/static-files-build:16 -c "npm install && grunt"
|
||||
# run static file check
|
||||
./rhodecode/tests/scripts/static-file-check.sh rhodecode/public/
|
||||
rm -rf node_modules
|
||||
|
||||
# check required files
|
||||
STATIC_CHECK="/robots.txt /502.html \
|
||||
/js/scripts.min.js /js/rhodecode-components.js \
|
||||
/css/style.css /css/style-polymer.css /css/style-ipython.css"
|
||||
|
||||
for file in $STATIC_CHECK;
|
||||
do
|
||||
if [ ! -f rhodecode/public/$file ]; then
|
||||
echo "Missing $file expected after web-build"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
.PHONY: pip-packages
|
||||
## Show outdated packages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue