MEDIAWIKI_LOAD_URL ?= http://localhost/w/load.php
-kss: nodecheck
-# FIXME: Use more up-to-date Ruby version
-
+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))
@command -v xdg-open >/dev/null 2>&1 || { open ${PWD}/static/index.html; exit 0; }
@xdg-open ${PWD}/static/index.html
-nodecheck:
- @scripts/nodecheck.sh
+kssnodecheck:
+ @scripts/kss-node-check.sh
--- /dev/null
+#!/usr/bin/env bash
+
+if command -v npm > /dev/null ; then
+ npm install
+else
+ # If npm isn't installed, but kss-node is, exit normally.
+ # This allows setting it up on one machine, and running it on
+ # another (e.g. Tools Labs execution nodes) that doesn't have npm
+ # installed. However, "npm install" still needs to be run
+ # occasionally to keep kss updated.
+
+ KSS_NODE="${BASH_SOURCE%/*}/../node_modules/.bin/kss-node"
+ if ! [ -x "$KSS_NODE" ] ; then
+ echo "Neither kss-node nor npm are installed."
+ echo "To install npm, see http://nodejs.org/"
+ echo "When npm is installed, the Makefile can automatically"
+ echo "install kss-node."
+ exit 1
+ fi
+fi
+++ /dev/null
-#!/usr/bin/env bash
-if command -v npm > /dev/null ; then
- npm install
-else
- echo "You need to install Node.JS!"
- echo "See http://nodejs.org/"
- exit 1
-fi