From: Matthew Flaschen Date: Wed, 22 Jan 2014 04:27:42 +0000 (-0800) Subject: Generate CSS for KSS through ResourceLoader X-Git-Tag: 1.31.0-rc.0~17193^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=0d5fc393f2965a49e5d7cfee6dd2d6df33fa8431;p=lhc%2Fweb%2Fwiklou.git Generate CSS for KSS through ResourceLoader This ensures the LESS is processed the same, so the behavior and output exactly match. Change-Id: I9bba8f2c328c9f9b9f7763cd335e280e973d03d6 --- diff --git a/resources/Makefile b/resources/Makefile index 4de5c2fff2..0d9608f0fc 100644 --- a/resources/Makefile +++ b/resources/Makefile @@ -1,9 +1,17 @@ +MEDIAWIKI_LOAD_URL ?= http://localhost/w/load.php + kss: nodecheck # FIXME: Use more up-to-date Ruby version - @node_modules/.bin/kss-node mediawiki.ui mediawiki.ui/docs -l mediawiki.ui/vector.less -t styleguide-template + +# Generates CSS of mediawiki.ui and mediawiki.ui.button using ResourceLoader, then applies it to the +# KSS style guide + $(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 @echo Opening the generated style guide... @command -v xdg-open >/dev/null 2>&1 || { open ${PWD}/mediawiki.ui/docs/index.html; exit 1; } @xdg-open ${PWD}/mediawiki.ui/docs/index.html + @rm $(KSS_RL_TMP) nodecheck: @scripts/nodecheck.sh