Stop make kss from opening browser
authorJuliusz Gonera <jgonera@wikimedia.org>
Wed, 5 Mar 2014 23:32:00 +0000 (15:32 -0800)
committerJdlrobson <jrobson@wikimedia.org>
Wed, 26 Mar 2014 18:05:23 +0000 (18:05 +0000)
Instead add make kssopen that opens the browser with the styleguide.
Most people will probably keep the style guide open in the browser and
refresh it themselves if they need to.

Change-Id: I5fd82d01da1c7f4bbf48ad921c2e7cb0407974b3

resources/Makefile

index 0d9608f..1b7aeb1 100644 (file)
@@ -8,10 +8,12 @@ kss: nodecheck
        $(eval KSS_RL_TMP := $(shell mktemp /tmp/tmp.XXXXXXXXXX))
        @curl -sG "${MEDIAWIKI_LOAD_URL}?modules=mediawiki.ui|mediawiki.ui.button&only=styles" > $(KSS_RL_TMP)
        @node_modules/.bin/kss-node mediawiki.ui mediawiki.ui/docs --css $(KSS_RL_TMP) -t styleguide-template
+       @rm $(KSS_RL_TMP)
+
+kssopen: kss
        @echo Opening the generated style guide...
-       @command -v xdg-open >/dev/null 2>&1 || { open ${PWD}/mediawiki.ui/docs/index.html; exit 1; }
+       @command -v xdg-open >/dev/null 2>&1 || { open ${PWD}/mediawiki.ui/docs/index.html; exit 0; }
        @xdg-open ${PWD}/mediawiki.ui/docs/index.html
-       @rm $(KSS_RL_TMP)
 
 nodecheck:
        @scripts/nodecheck.sh