Skip to content

Commit f4f549e

Browse files
authored
Merge branch 'master' into greenkeeper/liquidjs-6.1.0
2 parents 25f52b9 + f2c8364 commit f4f549e

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ const deepCopy = (obj) => {
99
return JSON.parse(JSON.stringify(obj));
1010
}
1111
/**
12-
*
12+
*
1313
* @param {
1414
* liquidjs options
1515
* tags custom tags
1616
* filters custom tags
1717
* data render data
18-
* } opts
18+
* } opts
1919
*/
2020
module.exports = function (opts) {
2121
const defaults = {
@@ -48,7 +48,7 @@ module.exports = function (opts) {
4848
// use deep copy data
4949
engine.parseAndRender(file.contents.toString(), deepCopy(opts.data || {}))
5050
.then((output) => {
51-
file.contents = new Buffer(output);
51+
file.contents = Buffer.from(output);
5252
this.push(file);
5353
callback();
5454
}).catch((ex) => {
@@ -57,4 +57,4 @@ module.exports = function (opts) {
5757
}
5858
}
5959
return through.obj(liquid);
60-
};
60+
};

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
},
66
"devDependencies": {
77
"del": "^3.0.0",
8-
"eslint": "^4.15.0",
8+
"eslint": "^5.0.0",
99
"eslint-plugin-mocha": "^5.0.0",
1010
"gulp": "^3.9.0",
11-
"gulp-eslint": "^4.0.1",
12-
"husky": "^0.14.3",
11+
"gulp-eslint": "^5.0.0",
12+
"husky": "^1.0.0",
1313
"mocha": "^5.0.0",
1414
"vinyl": "^2.1.0"
1515
},
1616
"name": "gulp-liquidr",
17-
"version": "1.0.4",
17+
"version": "2.0.0",
1818
"description": "gulp liquidjs static files render",
1919
"main": "index.js",
2020
"dependencies": {

test/test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe('empty data', function () {
3333
stream.on('end', cb);
3434
stream.write(new Vinyl({
3535
path: 'file.html',
36-
contents: new Buffer('hi {{name}}')
36+
contents: Buffer.from('hi {{name}}')
3737
}));
3838
stream.end();
3939
});
@@ -46,7 +46,7 @@ describe('empty data', function () {
4646
stream.on('end', cb);
4747
stream.write(new Vinyl({
4848
path: 'file.html',
49-
contents: new Buffer('{% if name %}OK{% endif %}')
49+
contents: Buffer.from('{% if name %}OK{% endif %}')
5050
}));
5151
stream.end();
5252
});
@@ -59,7 +59,7 @@ describe('empty data', function () {
5959
stream.on('end', cb);
6060
stream.write(new Vinyl({
6161
path: 'file.html',
62-
contents: new Buffer('{{name | add: "me", "na"}}')
62+
contents: Buffer.from('{{name | add: "me", "na"}}')
6363
}));
6464
stream.end();
6565
});
@@ -74,7 +74,7 @@ describe('with options', function () {
7474
stream.on('end', cb);
7575
stream.write(new Vinyl({
7676
path: 'file.html',
77-
contents: new Buffer('hi {{name}}')
77+
contents: Buffer.from('hi {{name}}')
7878
}));
7979
stream.end();
8080
});
@@ -87,7 +87,7 @@ describe('with options', function () {
8787
stream.on('end', cb);
8888
stream.write(new Vinyl({
8989
path: 'file.html',
90-
contents: new Buffer('{{name | test}}')
90+
contents: Buffer.from('{{name | test}}')
9191
}));
9292
stream.end();
9393
});
@@ -100,9 +100,9 @@ describe('with options', function () {
100100
stream.on('end', cb);
101101
stream.write(new Vinyl({
102102
path: 'file.html',
103-
contents: new Buffer('{% upper name %}')
103+
contents: Buffer.from('{% upper name %}')
104104
}));
105105
stream.end();
106106
})
107107

108-
});
108+
});

0 commit comments

Comments
 (0)