Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e049280

Browse files
author
velocityzen
committedOct 15, 2016
+ editor config
1 parent af517e1 commit e049280

File tree

2 files changed

+49
-36
lines changed

2 files changed

+49
-36
lines changed
 

‎.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
trim_trailing_whitespace = true
9+
10+
[**.{js,json,md}]
11+
insert_final_newline = true
12+
13+
[**.html]
14+
insert_final_newline = false

‎index.js

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,43 @@
1-
"use strict";
2-
let path = require("path");
3-
let Transform = require("stream").Transform;
4-
let Material = require("fuller-material-file");
1+
'use strict';
2+
let path = require('path');
3+
let Transform = require('stream').Transform;
4+
let Material = require('fuller-material-file');
55

66
let SrcFile = function(fuller, options) {
7-
fuller.bind(this);
8-
9-
this.src = options.src;
10-
this.dst = options.dst;
7+
fuller.bind(this);
8+
this.src = options.src;
9+
this.dst = options.dst;
1110
};
1211

1312
SrcFile.prototype = {
14-
build: function(src, dst) {
15-
let self = this;
16-
17-
let next = new Transform({
18-
objectMode: true,
19-
transform: function(mat, enc, cb) {
20-
cb(null, mat);
21-
}
22-
});
23-
24-
process.nextTick(function() {
25-
let srcfile = path.join(self.src, src),
26-
newMat = new Material({
27-
id: dst,
28-
path: srcfile
29-
})
30-
.dst(path.join(self.dst, dst))
31-
.error(function(err) {
32-
self.error(err);
33-
});
34-
35-
self.addDependencies(srcfile, dst);
36-
next.write(newMat);
37-
next.end();
38-
});
39-
40-
return next;
41-
}
13+
build: function(src, dst) {
14+
let self = this;
15+
16+
let next = new Transform({
17+
objectMode: true,
18+
transform: function(mat, enc, cb) {
19+
cb(null, mat);
20+
}
21+
});
22+
23+
process.nextTick(function() {
24+
let srcfile = path.join(self.src, src);
25+
let newMat = new Material({
26+
id: dst,
27+
path: srcfile
28+
})
29+
.dst(path.join(self.dst, dst))
30+
.error(function(err) {
31+
self.error(err);
32+
});
33+
34+
self.addDependencies(srcfile, dst);
35+
next.write(newMat);
36+
next.end();
37+
});
38+
39+
return next;
40+
}
4241
};
4342

4443

0 commit comments

Comments
 (0)
Please sign in to comment.