Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: appengine/swarming/elements/Makefile

Issue 2381853003: Add bot-page summary with utilization stats (Closed) Base URL: git@github.com:luci/luci-py@page-everywhere
Patch Set: address spaces Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/elements/.gitignore ('k') | appengine/swarming/elements/build/elements.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/elements/Makefile
diff --git a/appengine/swarming/elements/Makefile b/appengine/swarming/elements/Makefile
index ba0763b682ff09994c301ae2f19e401c214a87b0..a5cb5e0d7b6afa251ca0a21ec3c437df8ef66243 100644
--- a/appengine/swarming/elements/Makefile
+++ b/appengine/swarming/elements/Makefile
@@ -9,7 +9,7 @@ default:
# Run a local HTTP server for the demo pages.
.PHONY: run
-run: default
+run: default common_strings
-wget -nc --output-document=./res/imp/botlist/bot-list-demo.json https://raw.githubusercontent.com/wiki/luci/luci-py/bot-list-demo.json
-wget -nc --output-document=./res/imp/botlist/bot-list-fleet-data-demo.json https://raw.githubusercontent.com/wiki/luci/luci-py/bot-list-fleet-data-demo.json
-wget -nc --output-document=./res/imp/tasklist/task-list-demo.json https://raw.githubusercontent.com/wiki/luci/luci-py/task-list-demo.json
@@ -31,22 +31,37 @@ run: default
node_modules/.bin/http-server -p 9050
+.PHONY: clean
+clean:
+ rm -rf ./build/*
+ mkdir ./build/js
.PHONY: vulcanize
-vulcanize: default
- rm -rf ./build/*
- mkdir ./build/js
+vulcanize: clean default common_strings
./node_modules/.bin/vulcanize --inline-css --inline-scripts --strip-comments --abspath=./ elements.html | ./node_modules/.bin/html-minifier -o ./build/elements.html --minify-css --minify-js --remove-comments --collapse-whitespace --conservative-collapse
- cat ./res/imp/bower_components/webcomponentsjs/webcomponents-lite.min.js ./node_modules/skia-common-js/common.js ./res/js/common.js ./res/js/alias.js | ./node_modules/.bin/uglifyjs -o ./build/js/js.js
+ cat ./res/imp/bower_components/webcomponentsjs/webcomponents-lite.min.js ./build/js/common-strings.js ./node_modules/skia-common-js/common.js ./res/js/common.js ./res/js/alias.js | ./node_modules/.bin/uglifyjs -o ./build/js/js.js
.PHONY: debug_build
-debug_build: default
- rm -rf ./build/*
- mkdir ./build/js
+debug_build: clean default common_strings
cp elements.html ./build/elements.html
- cat ./res/imp/bower_components/webcomponentsjs/webcomponents-lite.min.js ./node_modules/skia-common-js/common.js ./res/js/common.js ./res/js/alias.js > ./build/js/js.js
+ cat ./res/imp/bower_components/webcomponentsjs/webcomponents-lite.min.js ./build/js/common-strings.js ./node_modules/skia-common-js/common.js ./res/js/common.js ./res/js/alias.js > ./build/js/js.js
ln --symbolic ../res/imp/ ./build/
+.PHONY: common_strings
+common_strings:
+ echo "(function(){var customUtils = {};" > ./build/js/common-strings.js
+ cat node_modules/common-substrings/lib/customUtils.js node_modules/common-substrings/lib/bst.js node_modules/common-substrings/lib/commonSubstrings.js >> ./build/js/common-strings.js
+ echo "window.Substrings = SuffixTrie;})();" >> ./build/js/common-strings.js
+ # Remove require-js related things.
+ sed -i -e 's/module.exports.getRandomArray/customUtils.getRandomArray/g' ./build/js/common-strings.js
+ sed -i -e 's/module.exports.defaultCompareKeysFunction/customUtils.defaultCompareKeysFunction/g' ./build/js/common-strings.js
+ sed -i -e 's/module.exports.defaultCheckValueEquality/customUtils.defaultCheckValueEquality/g' ./build/js/common-strings.js
+ sed -i -e 's/var customUtils = require.*/ /g' ./build/js/common-strings.js
+ sed -i -e 's/module.exports = BinarySearchTree;/ /g' ./build/js/common-strings.js
+ sed -i -e 's/var BinarySearchTree = require.*/ /g' ./build/js/common-strings.js
+ sed -i -e 's/module.exports = SuffixTrie;/ /g' ./build/js/common-strings.js
+
+
.PHONY: dev_deploy
dev_deploy: vulcanize
../tools/gae upl -A chromium-swarm-dev
@@ -61,4 +76,8 @@ local_deploy: vulcanize
.PHONY: debug_local_deploy
debug_local_deploy: debug_build
- ../tools/start_servers.py
+ ../tools/start_servers.py
+
+.PHONY: debug_dev_deploy
+debug_dev_deploy: debug_build
+ ../tools/gae upl -A chromium-swarm-dev
« no previous file with comments | « appengine/swarming/elements/.gitignore ('k') | appengine/swarming/elements/build/elements.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698