mirror of
https://github.com/ansible/awx.git
synced 2026-02-19 04:00:06 -03:30
Separate node test build from browser build
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -19,6 +19,7 @@ awx/*.log
|
|||||||
tower/tower_warnings.log
|
tower/tower_warnings.log
|
||||||
celerybeat-schedule
|
celerybeat-schedule
|
||||||
awx/ui/static
|
awx/ui/static
|
||||||
|
awx/ui/build_test
|
||||||
|
|
||||||
# Python & setuptools
|
# Python & setuptools
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|||||||
19
Makefile
19
Makefile
@@ -5,8 +5,10 @@ PACKER ?= packer
|
|||||||
GRUNT ?= $(shell [ -t 0 ] && echo "grunt" || echo "grunt --no-color")
|
GRUNT ?= $(shell [ -t 0 ] && echo "grunt" || echo "grunt --no-color")
|
||||||
TESTEM ?= ./node_modules/.bin/testem
|
TESTEM ?= ./node_modules/.bin/testem
|
||||||
BROCCOLI_BIN ?= ./node_modules/.bin/broccoli
|
BROCCOLI_BIN ?= ./node_modules/.bin/broccoli
|
||||||
|
MOCHA_BIN ?= ./node_modules/.bin/mocha
|
||||||
NODE ?= node
|
NODE ?= node
|
||||||
|
|
||||||
|
CLIENT_TEST_DIR ?= build_test
|
||||||
|
|
||||||
# Get the branch information from git
|
# Get the branch information from git
|
||||||
GIT_DATE := $(shell git log -n 1 --format="%ai")
|
GIT_DATE := $(shell git log -n 1 --format="%ai")
|
||||||
@@ -320,7 +322,7 @@ package.json: packaging/grunt/package.template
|
|||||||
sed -e 's#%NAME%#$(NAME)#;s#%VERSION%#$(VERSION)#;s#%GIT_REMOTE_URL%#$(GIT_REMOTE_URL)#;' $< > $@
|
sed -e 's#%NAME%#$(NAME)#;s#%VERSION%#$(VERSION)#;s#%GIT_REMOTE_URL%#$(GIT_REMOTE_URL)#;' $< > $@
|
||||||
|
|
||||||
sync_ui: node_modules Brocfile.js
|
sync_ui: node_modules Brocfile.js
|
||||||
$(NODE) tools/ui/timepiece.js awx/ui/dist -- $(UI_FLAGS)
|
$(NODE) tools/ui/timepiece.js awx/ui/static -- $(UI_FLAGS)
|
||||||
|
|
||||||
# Update local npm install
|
# Update local npm install
|
||||||
node_modules: package.json
|
node_modules: package.json
|
||||||
@@ -330,15 +332,18 @@ node_modules: package.json
|
|||||||
awx/ui/%: node_modules clean-ui Brocfile.js bower.json
|
awx/ui/%: node_modules clean-ui Brocfile.js bower.json
|
||||||
$(BROCCOLI_BIN) build $@ -- $(UI_FLAGS)
|
$(BROCCOLI_BIN) build $@ -- $(UI_FLAGS)
|
||||||
|
|
||||||
devjs: node_modules clean-ui Brocfile.js bower.json Gruntfile.js
|
testjs: UI_FLAGS=--node-tests --no-concat --no-styles $(EXTRA_UI_FLAGS)
|
||||||
make awx/ui/static
|
testjs: awx/ui/build_test
|
||||||
|
$(MOCHA_BIN) --full-trace $(shell find awx/ui/build_test -name '*-test.js')
|
||||||
|
|
||||||
|
devjs: awx/ui/static
|
||||||
|
|
||||||
# Build minified JS/CSS.
|
# Build minified JS/CSS.
|
||||||
minjs: node_modules clean-ui Brocfile.js
|
minjs: UI_FLAGS=--silent --compress --no-docs --no-sourcemaps $(EXTRA_UI_FLAGS)
|
||||||
make -e awx/ui/static UI_FLAGS="--silent --no-debug --no-tests --compress --no-docs --no-sourcemaps"
|
minjs: awx/ui/static node_modules clean-ui Brocfile.js
|
||||||
|
|
||||||
minjs_ci: node_modules clean-ui Brocfile.js
|
minjs_ci: UI_FLAGS=--compress --no-docs --browser-tests $(EXTRA_UI_FLAGS)
|
||||||
make -e awx/ui/static UI_FLAGS="--no-debug --compress --no-docs"
|
minjs_ci: awx/ui/static node_modules clean-ui Brocfile.js
|
||||||
|
|
||||||
# Check .js files for errors and lint
|
# Check .js files for errors and lint
|
||||||
jshint: node_modules Gruntfile.js
|
jshint: node_modules Gruntfile.js
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
"awx/ui/static/docs/**/*"
|
"awx/ui/static/docs/**/*"
|
||||||
],
|
],
|
||||||
"watch": [
|
"watch": [
|
||||||
"awx/ui/static",
|
"tools/ui/timepiece.js",
|
||||||
"awx/ui/tests",
|
"packaging/grunt/Brocfile.js",
|
||||||
"awx/ui/templates/ui/index.html"
|
"packaging/grunt/tower-app.js"
|
||||||
],
|
],
|
||||||
"ext": "js json less html"
|
"ext": "js json less html"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user