Skip to content

Commit c4abe60

Browse files
author
velocityzen
committed
Updated dependencies
1 parent e049280 commit c4abe60

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

index.js

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,31 @@
11
'use strict';
2-
let path = require('path');
3-
let Transform = require('stream').Transform;
4-
let Material = require('fuller-material-file');
2+
const path = require('path');
3+
const Transform = require('stream').Transform;
4+
const Material = require('fuller-material-file');
55

6-
let SrcFile = function(fuller, options) {
6+
const Tool = function(fuller, options) {
77
fuller.bind(this);
88
this.src = options.src;
99
this.dst = options.dst;
1010
};
1111

12-
SrcFile.prototype = {
12+
Tool.prototype = {
1313
build: function(src, dst) {
14-
let self = this;
15-
16-
let next = new Transform({
14+
const next = new Transform({
1715
objectMode: true,
18-
transform: function(mat, enc, cb) {
19-
cb(null, mat);
20-
}
16+
transform: (mat, enc, cb) => cb(null, mat)
2117
});
2218

23-
process.nextTick(function() {
24-
let srcfile = path.join(self.src, src);
25-
let newMat = new Material({
19+
process.nextTick(() => {
20+
const srcfile = path.join(this.src, src);
21+
const newMat = new Material({
2622
id: dst,
2723
path: srcfile
2824
})
29-
.dst(path.join(self.dst, dst))
30-
.error(function(err) {
31-
self.error(err);
32-
});
25+
.dst(path.join(this.dst, dst))
26+
.error(err => this.error(err));
3327

34-
self.addDependencies(srcfile, dst);
28+
this.addDependencies(srcfile, dst);
3529
next.write(newMat);
3630
next.end();
3731
});
@@ -41,4 +35,4 @@ SrcFile.prototype = {
4135
};
4236

4337

44-
module.exports = SrcFile;
38+
module.exports = Tool;

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
{
22
"name": "fuller-src-file",
33
"version": "0.3.0",
4-
"license" : "MIT",
4+
"license": "MIT",
55
"description": "Fuller tool: file source",
6-
"keywords": ["file", "source", "fuller", "build", "automation"],
6+
"keywords": [
7+
"file",
8+
"source",
9+
"fuller",
10+
"build",
11+
"automation"
12+
],
713
"author": "Alexey Novikov (http://2dubs.com)",
814
"engines": {
915
"node": "~0.12.0",

0 commit comments

Comments
 (0)