Use lastest node and latest package versions

This should make build faster and more reliable.
parent b8bcfe0f
...@@ -26,3 +26,4 @@ npm-debug.log ...@@ -26,3 +26,4 @@ npm-debug.log
tests/npm-cache tests/npm-cache
django-pipeline-*/ django-pipeline-*/
.tags .tags
node_modules/
...@@ -17,6 +17,12 @@ env: ...@@ -17,6 +17,12 @@ env:
- TOXENV=py34-django19 - TOXENV=py34-django19
- TOXENV=py35-django19 - TOXENV=py35-django19
docsinstall: pip install -q tox docsinstall: pip install -q tox
before_install:
- nvm install node
- nvm use node
install:
- pip install -r requirements.txt
- npm install
script: tox script: tox
deploy: deploy:
provider: pypi provider: pypi
......
...@@ -11,17 +11,17 @@ ...@@ -11,17 +11,17 @@
"url": "git://github.com/jazzband/django-pipeline.git" "url": "git://github.com/jazzband/django-pipeline.git"
}, },
"dependencies": { "dependencies": {
"babel-cli": "^6.4.5", "babel-cli": "latest",
"babel-preset-es2015": "^6.3.13", "babel-preset-es2015": "latest",
"coffee-script": "^1.10.0", "coffee-script": "latest",
"less": "^2.5.3", "less": "latest",
"livescript": "^1.4.0", "livescript": "latest",
"node-sass": "^3.4.2", "node-sass": "latest",
"stylus": "^0.53.0", "stylus": "latest",
"cssmin": "^0.4.3", "cssmin": "latest",
"google-closure-compiler": "^20151216.2.0", "google-closure-compiler": "latest",
"uglify-js": "^2.6.1", "uglify-js": "latest",
"yuglify": "^0.1.4", "yuglify": "latest",
"yuicompressor": "^2.4.8" "yuicompressor": "latest"
} }
} }
#!/usr/bin/env python
"""
A cross-platform compatible `npm install` call, checking whether npm is
in fact installed on the system first (and on windows, checking that the
npm version is at least 3.0 because of a bug in 2.x with MAX_PATH)
"""
import distutils.spawn
import os
from pkg_resources import parse_version
import re
import subprocess
import sys
def main():
tests_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
if os.name == 'nt':
try:
npm_paths = subprocess.check_output(['where', 'npm.cmd'])
except subprocess.CalledProcessError:
return
else:
npm_bin = re.split(r'\r?\n', npm_paths)[0]
else:
npm_bin = distutils.spawn.find_executable('npm')
if not npm_bin:
return
if os.name == 'nt':
os.environ.setdefault('APPDATA', '.')
npm_version = subprocess.check_output([npm_bin, '--version']).strip()
# Skip on windows if npm version is less than 3 because of
# MAX_PATH issues in version 2
if parse_version(npm_version) < parse_version('3.0'):
return
pipe = subprocess.Popen([npm_bin, 'install'],
cwd=tests_dir, stdout=sys.stdout, stderr=sys.stderr)
pipe.communicate()
sys.exit(pipe.returncode)
if __name__ == '__main__':
main()
...@@ -122,12 +122,12 @@ PIPELINE = { ...@@ -122,12 +122,12 @@ PIPELINE = {
} }
} }
NODE_MODULES_PATH = local_path('node_modules') NODE_MODULES_PATH = local_path('../node_modules')
NODE_BIN_PATH = os.path.join(NODE_MODULES_PATH, '.bin') NODE_BIN_PATH = os.path.join(NODE_MODULES_PATH, '.bin')
NODE_EXE_PATH = distutils.spawn.find_executable('node') NODE_EXE_PATH = distutils.spawn.find_executable('node')
JAVA_EXE_PATH = distutils.spawn.find_executable('java') JAVA_EXE_PATH = distutils.spawn.find_executable('java')
CSSTIDY_EXE_PATH = distutils.spawn.find_executable('csstidy') CSSTIDY_EXE_PATH = distutils.spawn.find_executable('csstidy')
HAS_NODE = os.path.exists(NODE_BIN_PATH) and NODE_EXE_PATH HAS_NODE = bool(NODE_EXE_PATH)
HAS_JAVA = bool(JAVA_EXE_PATH) HAS_JAVA = bool(JAVA_EXE_PATH)
HAS_CSSTIDY = bool(CSSTIDY_EXE_PATH) HAS_CSSTIDY = bool(CSSTIDY_EXE_PATH)
......
...@@ -23,7 +23,6 @@ setenv = ...@@ -23,7 +23,6 @@ setenv =
DJANGO_SETTINGS_MODULE = tests.settings DJANGO_SETTINGS_MODULE = tests.settings
PYTHONPATH = {toxinidir} PYTHONPATH = {toxinidir}
commands = commands =
{toxinidir}/tests/scripts/npm_install.py
{envbindir}/django-admin.py test {posargs:tests} {envbindir}/django-admin.py test {posargs:tests}
[testenv:docs] [testenv:docs]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment