Skip to content

Commit

Permalink
chore: update node support
Browse files Browse the repository at this point in the history
  • Loading branch information
fmal committed Nov 21, 2018
1 parent 2ed7510 commit 213d934
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ cache:
- ~/.npm
node_js:
- "9"
- "6"
- "4"
- "7.6"
after_success:
- npm run travis-deploy-once "npm run semantic-release"
branches:
Expand Down
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
var { inlineSource } = require('inline-source'),
PluginError = require('plugin-error'),
path = require('path'),
through = require('through2');
'use strict';

const { inlineSource } = require('inline-source');
const PluginError = require('plugin-error');
const path = require('path');
const through = require('through2');

const PLUGIN_NAME = 'gulp-inline-source';

function gulpInlineSource (options) {
'use strict';

return through.obj(function (file, enc, cb) {
var self = this;

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"css",
"javascript"
],
"engines": {
"node": ">=7.6"
},
"scripts": {
"test": "tape test/*.js | faucet",
"commit": "git-cz",
Expand Down
22 changes: 11 additions & 11 deletions test/main.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

var path = require('path'),
Vinyl = require('vinyl'),
fs = require('fs'),
test = require('tape'),
inlinesource = require('../');
const path = require('path');
const Vinyl = require('vinyl');
const fs = require('fs');
const test = require('tape');
const inlinesource = require('../');

function getFile (filePath, contents) {
return new Vinyl({
Expand Down Expand Up @@ -60,7 +60,7 @@ test('works with relative paths', function (t) {
});

test('inlines assets without minification', function (t) {
var stream = inlinesource({
const stream = inlinesource({
compress: false
});

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

test('throws when trying to compress non-ES5 syntax', function (t) {
t.plan(1);
var stream = inlinesource({ compress: true });

const stream = inlinesource({ compress: true });

stream.on('error', function (err) {
t.pass();
});

stream.on('finish', function () {
t.end();
});

stream.write(getFixture('script-es6.html'));
stream.end();
});

0 comments on commit 213d934

Please sign in to comment.