Comparing version 0.3.1 to 0.4.0
@@ -1,2 +0,3 @@ | ||
var es = require('event-stream'); | ||
var isWin = /^win/.test(process.platform); | ||
var through = require('through2').obj; | ||
var cjsx = require('coffee-react'); | ||
@@ -14,3 +15,3 @@ var gutil = require('gulp-util'); | ||
module.exports = function(opt) { | ||
function modifyFile(file) { | ||
function modifyFile(file, enc, callback) { | ||
if (file.isNull()) return this.emit('data', file); // pass along | ||
@@ -48,6 +49,6 @@ if (file.isStream()) return this.emit('error', error('Streaming not supported')); | ||
file.path = dest; | ||
this.emit('data', file); | ||
callback(null, file) | ||
}; | ||
return es.through(modifyFile); | ||
return through(modifyFile); | ||
}; |
{ | ||
"name": "gulp-cjsx", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"description": "'Coffee-react module for GulpJs'", | ||
@@ -33,3 +33,2 @@ "author": "Matt Smith <mtscout6@gmail.com> (http://softwarebymatt.com)", | ||
"coffee-react": "^0.5.0", | ||
"event-stream": "~3.1.7", | ||
"gulp": "~3.8.5", | ||
@@ -39,3 +38,4 @@ "gulp-sourcemaps": "^1.1.0", | ||
"merge": "^1.2.0", | ||
"vinyl-sourcemaps-apply": "~0.1.1" | ||
"vinyl-sourcemaps-apply": "~0.1.1", | ||
"through2": "~0.6.1" | ||
}, | ||
@@ -42,0 +42,0 @@ "devDependencies": { |
@@ -0,1 +1,2 @@ | ||
var isWin = /^win/.test(process.platform); | ||
var cjsxPlugin = require('../'); | ||
@@ -38,3 +39,6 @@ var should = require('should'); | ||
this.expected = expected.shift(); | ||
this.newPath = newPaths.shift(); | ||
this.newPath = newPaths.shift(); | ||
if(isWin){ | ||
this.newPath = this.newPath.replace(/\//g, '\\'); | ||
} | ||
@@ -47,2 +51,3 @@ should.exist(newFile); | ||
newFile.relative.should.equal(path.basename(this.newPath)); | ||
String(newFile.contents).should.equal(this.expected); | ||
@@ -49,0 +54,0 @@ |
54754
288
+ Addedthrough2@~0.6.1
- Removedevent-stream@~3.1.7
- Removedduplexer@0.1.2(transitive)
- Removedevent-stream@3.1.7(transitive)
- Removedfrom@0.1.7(transitive)
- Removedmap-stream@0.1.0(transitive)
- Removedpause-stream@0.0.11(transitive)
- Removedsplit@0.2.10(transitive)
- Removedstream-combiner@0.0.4(transitive)
- Removedthrough@2.3.8(transitive)