Skip to content

Commit 14f0a1e

Browse files
author
Contra
committed
badges and refactor
1 parent 8ac77fc commit 14f0a1e

14 files changed

+26
-18
lines changed

README.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
[![Build Status](https://travis-ci.org/wearefractal/vinyl-fs.png?branch=master)](https://travis-ci.org/wearefractal/vinyl-fs)
2-
3-
[![NPM version](https://badge.fury.io/js/vinyl-fs.png)](http://badge.fury.io/js/vinyl-fs)
1+
# vinyl-fs [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)
42

53
## Information
64

@@ -14,7 +12,7 @@
1412
</tr>
1513
<tr>
1614
<td>Node Version</td>
17-
<td>>= 0.4</td>
15+
<td>>= 0.9</td>
1816
</tr>
1917
</table>
2018

@@ -100,4 +98,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10098
[node-glob]: https://github.com/isaacs/node-glob
10199
[gaze]: https://github.com/shama/gaze
102100
[glob-watcher]: https://github.com/shama/gaze
103-
[vinyl]: https://github.com/wearefractal/vinyl
101+
[vinyl]: https://github.com/wearefractal/vinyl
102+
[npm-url]: https://npmjs.org/package/vinyl-fs
103+
[npm-image]: https://badge.fury.io/js/vinyl-fs.png
104+
[travis-url]: https://travis-ci.org/wearefractal/vinyl-fs
105+
[travis-image]: https://travis-ci.org/wearefractal/vinyl-fs.png?branch=master
106+
[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl-fs
107+
[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl-fs/badge.png
108+
[depstat-url]: https://david-dm.org/wearefractal/vinyl-fs
109+
[depstat-image]: https://david-dm.org/wearefractal/vinyl-fs.png

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
src: require('./lib/createInputStream'),
3-
dest: require('./lib/createOutputStream'),
2+
src: require('./lib/src'),
3+
dest: require('./lib/dest'),
44
watch: require('glob-watcher')
55
};

lib/createOutputStream/index.js lib/dest/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ module.exports = function(folder, opt) {
88
if (!opt) opt = {};
99
// TODO: support opt.cwd
1010

11-
folder = path.resolve(folder);
12-
1311
// TODO: clean this crap up
1412
// createOutputStream should be a mirror of createInputStream file-wise
1513
function saveFile (file, cb) {
1614
var writePath = path.join(folder, file.relative);
1715
var writeFolder = path.dirname(writePath);
1816

17+
console.log(writePath, writeFolder);
1918
mkdirp(writeFolder, function(err){
2019
if (err) return cb(err);
2120
writeFile(writePath, file, cb);
File renamed without changes.

lib/createOutputStream/writeContents.js lib/dest/writeContents.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module.exports = function (writePath, file, cb) {
1212
if (file.isNull()) return done();
1313

1414
// if directory then mkdirp it
15-
// probably redundant since we are already doing an mkdirp
1615
if (file.isDirectory()) {
1716
writeDir(writePath, file, done);
1817
return;
@@ -24,8 +23,8 @@ module.exports = function (writePath, file, cb) {
2423
return;
2524
}
2625

26+
// write it like normal
2727
if (file.isBuffer()) {
28-
// write it like normal
2928
writeBuffer(writePath, file, done);
3029
return;
3130
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

package.json

+11-7
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,25 @@
1212
"mkdirp": "~0.3.5",
1313
"glob-watcher": "0.0.1",
1414
"graceful-fs": "~2.0.1",
15-
"map-stream": "~0.1.0",
16-
"should": "~2.1.1",
17-
"mocha": "~1.17.0"
15+
"map-stream": "~0.1.0"
1816
},
1917
"devDependencies": {
20-
"mocha": "*",
21-
"should": "*",
18+
"mocha": "~1.17.0",
19+
"should": "~2.1.1",
20+
"mocha-lcov-reporter": "*",
21+
"coveralls": "~2.6.1",
22+
"istanbul": "~0.2.3",
23+
"rimraf": "~2.2.5",
24+
"jshint": "~2.4.1",
2225
"buffer-equal": "0.0.0",
2326
"event-stream": "~3.0.20"
2427
},
2528
"scripts": {
26-
"test": "mocha --reporter spec"
29+
"test": "mocha --reporter spec && jshint",
30+
"coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
2731
},
2832
"engines": {
29-
"node": ">= 0.4.0"
33+
"node": ">= 0.9"
3034
},
3135
"licenses": [
3236
{

0 commit comments

Comments
 (0)