Add 'npm install' task to the make process

Also, clean up node_modules/ and other generated .js and .css files during
'make clean'.
This commit is contained in:
James Laska
2014-02-17 10:18:33 -05:00
parent cc9869b198
commit 4df13d7e99

View File

@@ -40,7 +40,8 @@ clean:
rm -rf dist/* rm -rf dist/*
rm -rf build rpm-build *.egg-info rm -rf build rpm-build *.egg-info
rm -rf debian deb-build rm -rf debian deb-build
rm -f awx/ui/static/js/awx-min.js rm -f awx/ui/static/css/awx*.js awx/ui/static/css/awx*.css
rm -rf node_modules
find . -type f -regex ".*\.py[co]$$" -delete find . -type f -regex ".*\.py[co]$$" -delete
# Fetch from origin, rebase local commits on top of origin commits. # Fetch from origin, rebase local commits on top of origin commits.
@@ -137,15 +138,18 @@ test_tox:
test_jenkins: test_jenkins:
$(PYTHON) manage.py jenkins -v2 $(PYTHON) manage.py jenkins -v2
# Update local npm install
node_modules:
npm install
# Build minified JS/CSS. # Build minified JS/CSS.
minjs: minjs: node_modules
grunt grunt
# Check .js files for errors and lint # Check .js files for errors and lint
lintjs: lintjs: node_modules
grunt jshint grunt jshint
# Build a pip-installable package into dist/ with a timestamped version number. # Build a pip-installable package into dist/ with a timestamped version number.
dev_build: dev_build:
$(PYTHON) setup.py dev_build $(PYTHON) setup.py dev_build