Skip to content

Commit 3dd83d8

Browse files
committed
chore: ensure node 6 & 7 compatibility
1 parent b194a86 commit 3dd83d8

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
language: node_js
2626
node_js:
27+
- "6"
28+
- "7"
2729
- "8"
2830
- "9"
2931
- "10"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"@babel/core": "7.8.7",
4343
"@babel/parser": "7.8.8",
4444
"@babel/preset-env": "7.8.7",
45-
"del": "5.1.0",
4645
"eslint": "6.8.0",
4746
"eslint-config-google": "0.14.0",
4847
"fancy-log": "1.3.3",
@@ -56,6 +55,7 @@
5655
"gulp-prettier": "2.3.0",
5756
"jasmine-core": "3.5.0",
5857
"q": "1.5.1",
58+
"rimraf": "3.0.2",
5959
"rollup": "1.32.0",
6060
"tmp": "0.1.0"
6161
}

scripts/clean/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25-
const del = require('del');
25+
const rimraf = require('rimraf');
2626
const config = require('../config');
2727

28-
module.exports = function clean() {
29-
return del(config.dist);
28+
module.exports = function clean(done) {
29+
return rimraf(config.dist, done);
3030
};

scripts/lint/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,18 @@
2424

2525
const path = require('path');
2626
const gulp = require('gulp');
27-
const eslint = require('gulp-eslint');
2827
const config = require('../config');
2928
const log = require('../log');
3029

3130
module.exports = function lint() {
31+
const nodeVersion = process.versions.node;
32+
const major = Number(nodeVersion.split('.')[0]);
33+
if (major < 8) {
34+
log.debug(`Skipping ESLint because of node version compatibility (currenly in used: ${nodeVersion})`);
35+
return Promise.resolve();
36+
}
37+
38+
const eslint = require('gulp-eslint');
3239
const src = [
3340
path.join(config.root, '*.js'),
3441
path.join(config.src, '**', '*.js'),

0 commit comments

Comments
 (0)