run jshint before tests, support of node back to v0.6tags/v1.1.0
| @@ -1,5 +1,6 @@ | |||||
| { | { | ||||
| "eqnull": true, | "eqnull": true, | ||||
| "evil": true | |||||
| "evil": true, | |||||
| "unused": true | |||||
| } | } | ||||
| @@ -4,6 +4,8 @@ node_js: | |||||
| - 0.8 | - 0.8 | ||||
| - '0.10' | - '0.10' | ||||
| - 0.11 | - 0.11 | ||||
| before_install: | |||||
| - "test $TRAVIS_NODE_VERSION = '0.6' && npm install -g npm@1.3.26 || npm install -g npm" | |||||
| matrix: | matrix: | ||||
| allow_failures: | allow_failures: | ||||
| - node_js: 0.11 | - node_js: 0.11 | ||||
| @@ -490,6 +490,14 @@ Then, you can run the test with: | |||||
| $ TEST=mytest npm run test-render | $ TEST=mytest npm run test-render | ||||
| ### Troubleshooting | |||||
| #### npm install fails | |||||
| Ensure to have a recent version of npm installed. While developing this project requires npm with support for `^` version ranges. | |||||
| $ npm install -g npm | |||||
| ## Thanks | ## Thanks | ||||
| mustache.js wouldn't kick ass if it weren't for these fine souls: | mustache.js wouldn't kick ass if it weren't for these fine souls: | ||||
| @@ -507,7 +507,7 @@ | |||||
| return this.renderTokens(token[4], context, partials, originalTemplate); | return this.renderTokens(token[4], context, partials, originalTemplate); | ||||
| }; | }; | ||||
| Writer.prototype._renderPartial = function(token, context, partials, originalTemplate) { | |||||
| Writer.prototype._renderPartial = function(token, context, partials) { | |||||
| if (!partials) return; | if (!partials) return; | ||||
| var value = isFunction(partials) ? partials(token[1]) : partials[token[1]]; | var value = isFunction(partials) ? partials(token[1]) : partials[token[1]]; | ||||
| @@ -17,12 +17,17 @@ | |||||
| "volo": { | "volo": { | ||||
| "url": "https://raw.github.com/janl/mustache.js/{version}/mustache.js" | "url": "https://raw.github.com/janl/mustache.js/{version}/mustache.js" | ||||
| }, | }, | ||||
| "engines": { | |||||
| "npm": ">=1.4.0" | |||||
| }, | |||||
| "scripts": { | "scripts": { | ||||
| "pretest": "jshint mustache.js", | |||||
| "test": "mocha --reporter spec", | "test": "mocha --reporter spec", | ||||
| "test-render": "mocha --reporter spec test/render-test" | "test-render": "mocha --reporter spec test/render-test" | ||||
| }, | }, | ||||
| "devDependencies": { | "devDependencies": { | ||||
| "mocha": "2.0.1" | |||||
| "jshint": "~2.4.4", | |||||
| "mocha": "~2.1.0" | |||||
| }, | }, | ||||
| "spm": { | "spm": { | ||||
| "main": "mustache.js", | "main": "mustache.js", | ||||