Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use map-stream instead of event-stream / Fix .travis.yml #5

Merged
merged 3 commits into from
Dec 15, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
language: node_js
node_js:
- 0.9
- 0.10
- 0.11
- 0.12
- '0.10'
- '0.11'
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var es = require('event-stream');
var mapStream = require('map-stream');
var _ = require('lodash');
var frontMatter = require('front-matter');
var gutil = require('gulp-util');
Expand All @@ -13,7 +13,7 @@ module.exports = function (options) {
remove: true
}, options || {});

return es.map(function (file, cb) {
return mapStream(function (file, cb) {
var content;

if (file.isBuffer()) {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
},
"homepage": "https://github.com/lmtm/gulp-front-matter",
"dependencies": {
"event-stream": "~3.1.0",
"front-matter": "~0.2.0",
"lodash": "~2.4.1"
"lodash": "~2.4.1",
"map-stream": "^0.1.0"
},
"devDependencies": {
"chai": "~1.8.1",
"mocha": "~1.17.0",
"gulp": "~3.4.0",
"chai": "~1.9.1",
"mocha": "~1.20.1",
"gulp": "~3.8.6",
"gulp-util": "~2.2.14"
},
"engines": {
Expand Down
6 changes: 3 additions & 3 deletions test/gulp-front-matter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var gulp = require('gulp');
var gutil = require('gulp-util');
var expect = require('chai').expect;

var es = require('event-stream');
var mapStream = require('map-stream');
var fs = require('fs');
var path = require('path');
var stream = require('stream');
Expand All @@ -18,14 +18,14 @@ function test (input, options, check) {
return function (done) {
gulp.src(input)
// Keep original contents
.pipe(es.map(function (file, cb) {
.pipe(mapStream(function (file, cb) {
file.originalContents = file.contents;
cb(null, file);
}))
// Execute plugin
.pipe(frontMatter(options))
// Test
.pipe(es.map(check).on('end', done));
.pipe(mapStream(check).on('end', done));
};
}

Expand Down