Use lastest node and latest package versions

This should make build faster and more reliable.
parent b8bcfe0f
......@@ -26,3 +26,4 @@ npm-debug.log
tests/npm-cache
django-pipeline-*/
.tags
node_modules/
......@@ -17,6 +17,12 @@ env:
- TOXENV=py34-django19
- TOXENV=py35-django19
docsinstall: pip install -q tox
before_install:
- nvm install node
- nvm use node
install:
- pip install -r requirements.txt
- npm install
script: tox
deploy:
provider: pypi
......
......@@ -11,17 +11,17 @@
"url": "git://github.com/jazzband/django-pipeline.git"
},
"dependencies": {
"babel-cli": "^6.4.5",
"babel-preset-es2015": "^6.3.13",
"coffee-script": "^1.10.0",
"less": "^2.5.3",
"livescript": "^1.4.0",
"node-sass": "^3.4.2",
"stylus": "^0.53.0",
"cssmin": "^0.4.3",
"google-closure-compiler": "^20151216.2.0",
"uglify-js": "^2.6.1",
"yuglify": "^0.1.4",
"yuicompressor": "^2.4.8"
"babel-cli": "latest",
"babel-preset-es2015": "latest",
"coffee-script": "latest",
"less": "latest",
"livescript": "latest",
"node-sass": "latest",
"stylus": "latest",
"cssmin": "latest",
"google-closure-compiler": "latest",
"uglify-js": "latest",
"yuglify": "latest",
"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 = {
}
}
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_EXE_PATH = distutils.spawn.find_executable('node')
JAVA_EXE_PATH = distutils.spawn.find_executable('java')
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_CSSTIDY = bool(CSSTIDY_EXE_PATH)
......
......@@ -23,7 +23,6 @@ setenv =
DJANGO_SETTINGS_MODULE = tests.settings
PYTHONPATH = {toxinidir}
commands =
{toxinidir}/tests/scripts/npm_install.py
{envbindir}/django-admin.py test {posargs:tests}
[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