Skip to content

Commit 213d934

Browse files
committed
chore: update node support
1 parent 2ed7510 commit 213d934

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ cache:
55
- ~/.npm
66
node_js:
77
- "9"
8-
- "6"
9-
- "4"
8+
- "7.6"
109
after_success:
1110
- npm run travis-deploy-once "npm run semantic-release"
1211
branches:

index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
var { inlineSource } = require('inline-source'),
2-
PluginError = require('plugin-error'),
3-
path = require('path'),
4-
through = require('through2');
1+
'use strict';
2+
3+
const { inlineSource } = require('inline-source');
4+
const PluginError = require('plugin-error');
5+
const path = require('path');
6+
const through = require('through2');
57

68
const PLUGIN_NAME = 'gulp-inline-source';
79

810
function gulpInlineSource (options) {
9-
'use strict';
10-
1111
return through.obj(function (file, enc, cb) {
1212
var self = this;
1313

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"css",
1212
"javascript"
1313
],
14+
"engines": {
15+
"node": ">=7.6"
16+
},
1417
"scripts": {
1518
"test": "tape test/*.js | faucet",
1619
"commit": "git-cz",

test/main.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use strict';
22

3-
var path = require('path'),
4-
Vinyl = require('vinyl'),
5-
fs = require('fs'),
6-
test = require('tape'),
7-
inlinesource = require('../');
3+
const path = require('path');
4+
const Vinyl = require('vinyl');
5+
const fs = require('fs');
6+
const test = require('tape');
7+
const inlinesource = require('../');
88

99
function getFile (filePath, contents) {
1010
return new Vinyl({
@@ -60,7 +60,7 @@ test('works with relative paths', function (t) {
6060
});
6161

6262
test('inlines assets without minification', function (t) {
63-
var stream = inlinesource({
63+
const stream = inlinesource({
6464
compress: false
6565
});
6666

@@ -69,17 +69,17 @@ test('inlines assets without minification', function (t) {
6969

7070
test('throws when trying to compress non-ES5 syntax', function (t) {
7171
t.plan(1);
72-
73-
var stream = inlinesource({ compress: true });
74-
72+
73+
const stream = inlinesource({ compress: true });
74+
7575
stream.on('error', function (err) {
7676
t.pass();
7777
});
78-
78+
7979
stream.on('finish', function () {
8080
t.end();
8181
});
82-
82+
8383
stream.write(getFixture('script-es6.html'));
8484
stream.end();
8585
});

0 commit comments

Comments
 (0)