Comparing version 0.0.2 to 0.0.3
@@ -18,4 +18,6 @@ 'use strict'; | ||
} | ||
} else { | ||
return false; | ||
} | ||
})(); |
# Srcy Change log | ||
## 17 October 2013, 0.0.3 | ||
* More elegant exit on success with message. | ||
* srcy tests can now be run with "srcy" from npm run-script or the command line. | ||
## 17 October 2013, 0.0.2 | ||
@@ -4,0 +8,0 @@ * Better checking of ignored resources (check at folder level as well as file) |
'use strict'; | ||
var feedback = require('./feedback'), | ||
itterate = require('./itterate'); | ||
itterate = require('./itterate'), | ||
log = require('./log'); | ||
module.exports = function (imgs, refs) { | ||
var matched = {}; | ||
var matched = {}, | ||
errors; | ||
@@ -21,4 +23,10 @@ itterate(refs, function (val, ref) { | ||
return (Object.keys(refs).length); | ||
errors = Object.keys(refs).length; | ||
if (!errors && !Object.keys(imgs).length) { | ||
log.success('no issues found'); | ||
} | ||
return (errors); | ||
}; |
{ | ||
"name": "srcy", | ||
"description": "Check project image paths for missing or redundant images", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"keywords": ["images", "paths", "assets", "test", "build"], | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -36,6 +36,14 @@ # Srcy [![Build Status](https://secure.travis-ci.org/mattyod/srcy.png?branch=master)](http://travis-ci.org/mattyod/srcy) | ||
"scripts": { | ||
srcy": "node node_modules/srcy/srcy.js" | ||
"srcy": "node node_modules/srcy/srcy.js" | ||
} | ||
``` | ||
Or if you have Srcy installed globally on your test environment you can use: | ||
``` | ||
"scripts": { | ||
"srcy": "srcy" | ||
} | ||
``` | ||
## Configuration | ||
@@ -42,0 +50,0 @@ |
'use strict'; | ||
var check = require('../../lib/check.js'), | ||
feedback = require('../../lib/feedback'); | ||
feedback = require('../../lib/feedback'), | ||
log = require('../../lib/log'); | ||
@@ -29,2 +30,4 @@ describe('check', sandbox(function () { | ||
this.stub(log, 'success'); | ||
this.stub(feedback, 'show'); | ||
@@ -39,2 +42,6 @@ }); | ||
it('logs a success message', function () { | ||
log.success.should.have.been.calledOnce; | ||
}); | ||
it('passes two empty objects to feedback', function () { | ||
@@ -41,0 +48,0 @@ feedback.show.args[0].should.deep.equal([ {}, {} ]); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
38733
829
274