浏览代码

Merge pull request #421 from phillipj/feature/jshint-on-test

run jshint before tests, support of node back to v0.6
tags/v1.1.0
David da Silva Contín 11 年前
父节点
当前提交
c26578a296
共有 5 个文件被更改,包括 19 次插入3 次删除
  1. +2
    -1
      .jshintrc
  2. +2
    -0
      .travis.yml
  3. +8
    -0
      README.md
  4. +1
    -1
      mustache.js
  5. +6
    -1
      package.json

+ 2
- 1
.jshintrc 查看文件

@@ -1,5 +1,6 @@
{
"eqnull": true,
"evil": true
"evil": true,
"unused": true
}


+ 2
- 0
.travis.yml 查看文件

@@ -4,6 +4,8 @@ node_js:
- 0.8
- '0.10'
- 0.11
before_install:
- "test $TRAVIS_NODE_VERSION = '0.6' && npm install -g npm@1.3.26 || npm install -g npm"
matrix:
allow_failures:
- node_js: 0.11

+ 8
- 0
README.md 查看文件

@@ -490,6 +490,14 @@ Then, you can run the test with:

$ 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

mustache.js wouldn't kick ass if it weren't for these fine souls:


+ 1
- 1
mustache.js 查看文件

@@ -507,7 +507,7 @@
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;

var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];


+ 6
- 1
package.json 查看文件

@@ -17,12 +17,17 @@
"volo": {
"url": "https://raw.github.com/janl/mustache.js/{version}/mustache.js"
},
"engines": {
"npm": ">=1.4.0"
},
"scripts": {
"pretest": "jshint mustache.js",
"test": "mocha --reporter spec",
"test-render": "mocha --reporter spec test/render-test"
},
"devDependencies": {
"mocha": "2.0.1"
"jshint": "~2.4.4",
"mocha": "~2.1.0"
},
"spm": {
"main": "mustache.js",


正在加载...
取消
保存