From 45cd975143d596893df0f4b6d668bf63199f583b Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Fri, 4 Jul 2014 14:01:43 -0700 Subject: [PATCH] Install dev dependencies via package.json as well --- .travis.yml | 2 +- INSTALL.rst | 2 +- package.json | 5 +++++ run_tests.sh | 5 +++-- salt/roots/checkers.sls | 7 ------- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 77db5fe..e0b9657 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ python: env: - NO_FRONTEND=1 install: - - if [[ -z "$NO_FRONTEND" ]]; then sudo add-apt-repository --yes ppa:chris-lea/node.js; sudo apt-get update -qq; sudo apt-get install nodejs; npm install -g coffeelint csslint; npm install; fi + - if [[ -z "$NO_FRONTEND" ]]; then sudo add-apt-repository --yes ppa:chris-lea/node.js; sudo apt-get update -qq; sudo apt-get install nodejs; npm install; fi - if [[ -z "$NO_FRONTEND" ]]; then gem install scss-lint; fi - if [[ -z "$NO_FRONTEND" ]]; then bower install; fi - if [[ -z "$NO_PYTHON" ]]; then export REQ_TXT=requirements/dev.txt; else export REQ_TXT=requirements.txt; fi; pip install -r "$REQ_TXT" diff --git a/INSTALL.rst b/INSTALL.rst index 6ba8df7..2c11801 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -114,5 +114,5 @@ the server: .. code-block:: shell-session - (venv)user@host:gmusicprocurator$ npm install + (venv)user@host:gmusicprocurator$ npm install --production (venv)user@host:gmusicprocurator$ node_modules/.bin/bower install -p diff --git a/package.json b/package.json index 6110fce..773467b 100644 --- a/package.json +++ b/package.json @@ -23,5 +23,10 @@ "coffeeify": "0.6.x", "uglify-js": "2.x" }, + "devDependencies": { + "coffeedoc": "0.x", + "coffeelint": "1.x", + "csslint": "0.x" + }, "private": true } diff --git a/run_tests.sh b/run_tests.sh index 13e0b13..77ac7e8 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -7,6 +7,7 @@ SCSS_DIR="${STATIC_DIR}"/scss MAIN_OUT_CSS="${SCSS_DIR}"/main.out.css CFG_DIR="$HOME/.config/gmusicapi" CFG_PATH="$CFG_DIR"/gmusicprocurator.cfg +NODE_BIN_DIR="${BASE_DIR}/node_modules/.bin" set -x @@ -17,10 +18,10 @@ if [[ -z "$NO_PYTHON" ]]; then fi if [[ -z "$NO_FRONTEND" ]]; then - coffeelint -f "${BASE_DIR}"/.coffeelint.json "${STATIC_DIR}"/cs + "$NODE_BIN_DIR"/coffeelint -f "${BASE_DIR}"/.coffeelint.json "${STATIC_DIR}"/cs scss-lint -e '*.css' "${SCSS_DIR}" scss --style expanded "${SCSS_DIR}"/main.scss "${MAIN_OUT_CSS}" - csslint "${MAIN_OUT_CSS}" + "$NODE_BIN_DIR"/csslint "${MAIN_OUT_CSS}" if [[ ! -f "$CFG_PATH" ]]; then mkdir -p "$CFG_DIR" echo 'GMP_OFFLINE_MODE = True' > "$CFG_PATH" diff --git a/salt/roots/checkers.sls b/salt/roots/checkers.sls index d8bf538..d5f8dd0 100644 --- a/salt/roots/checkers.sls +++ b/salt/roots/checkers.sls @@ -1,11 +1,4 @@ checkers: - npm.installed: - - names: - - coffeedoc - - coffeelint - - csslint - - require: - - pkg: nodejs gem.installed: - names: - scss-lint