Skip to content

Commit

Permalink
Merge pull request #4 from Yeti-or/yeti-or.remove-stream
Browse files Browse the repository at this point in the history
Remove stream from removeEntity module
  • Loading branch information
Yeti-or committed Apr 22, 2016
2 parents faf28a9 + 3724703 commit 2663fef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
14 changes: 1 addition & 13 deletions removeEntity.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
var fs = require('fs');

var through = require('through2');

function removeEntityFromDep(entity, dep) {
function removeElem(dep, elemName) {
Expand Down Expand Up @@ -69,13 +66,4 @@ function removeEntity(entity, bemDeps) {
.filter(d => Object.keys(d).length);
}

function removeEntityStream(entity) {
return through.obj(function(file, enc, next) {
var deps = removeEntity(file.data, deps);
var depsString = '(' + JSON.stringify(deps, null, 4) + ');';
fs.writeFileSync(file.path, depsString);
});
}

module.exports = removeEntityStream;
module.exports.removeEntity = removeEntity;
module.exports = removeEntity;
2 changes: 1 addition & 1 deletion test/removeEntity.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var chai = require('chai');
var expect = chai.expect;

var removeEntity = require('../removeEntity').removeEntity;
var removeEntity = require('../removeEntity');

describe('basic', function() {
it('should remove mustDeps', () => {
Expand Down

0 comments on commit 2663fef

Please sign in to comment.