LSG: Break module list into text file for readability
authorMatthew Flaschen <mflaschen@wikimedia.org>
Fri, 10 Oct 2014 01:41:08 +0000 (21:41 -0400)
committerJdlrobson <jrobson@wikimedia.org>
Mon, 19 Jan 2015 23:37:48 +0000 (23:37 +0000)
Change-Id: I3d66bcacf99da7eecc91a421c521dc650ed9cf82

docs/kss/Makefile
docs/kss/README.txt
docs/kss/styleGuideModules.txt [new file with mode: 0644]

index 31feec1..0024d98 100644 (file)
@@ -4,9 +4,9 @@ kss: kssnodecheck
 # 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))
-# Keep module names in strict alphabetical order, so CSS loads in the same order as ResourceLoader's addModuleStyles does; this can affect rendering.
+       $(eval MODULE_STR := $(shell paste -sd "|"  < styleGuideModules.txt))
 # See OutputPage::makeResourceLoaderLink.
-       @curl -sG "${MEDIAWIKI_LOAD_URL}?modules=mediawiki.legacy.commonPrint|mediawiki.legacy.shared|mediawiki.ui|mediawiki.ui.anchor|mediawiki.ui.button|mediawiki.ui.checkbox|mediawiki.ui.radio|mediawiki.ui.icon|mediawiki.ui.input|mediawiki.ui.text&only=styles" > $(KSS_RL_TMP)
+       @curl -sG "${MEDIAWIKI_LOAD_URL}?modules=${MODULE_STR}&only=styles" > $(KSS_RL_TMP)
        @node_modules/.bin/kss-node ../../resources/src/mediawiki.ui static/ --css $(KSS_RL_TMP) -t styleguide-template
        @rm $(KSS_RL_TMP)
 
index c383af9..76cfb62 100644 (file)
@@ -17,3 +17,5 @@ If MediaWiki is running on localhost, you can omit MEDIAWIKI_LOAD_URL.
 To rebuild without opening the web browser, run:
 
 MEDIAWIKI_LOAD_URL=mediawiki_hostname/w/load.php make
+
+When modifying styleGuideModules.txt, keep the list in strict alphabetical order (with no extra formatting), so CSS loads in the same order as ResourceLoader's addModuleStyles does; this can affect rendering.
diff --git a/docs/kss/styleGuideModules.txt b/docs/kss/styleGuideModules.txt
new file mode 100644 (file)
index 0000000..79212c0
--- /dev/null
@@ -0,0 +1,10 @@
+mediawiki.legacy.commonPrint
+mediawiki.legacy.shared
+mediawiki.ui
+mediawiki.ui.anchor
+mediawiki.ui.button
+mediawiki.ui.checkbox
+mediawiki.ui.radio
+mediawiki.ui.icon
+mediawiki.ui.input
+mediawiki.ui.text