Skip to content

Commit

Permalink
chore: fix build, make it compatible with node6
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeanroy committed Aug 18, 2019
1 parent 77012ed commit 331ab8b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"devDependencies": {
"@babel/core": "7.5.5",
"@babel/preset-env": "7.5.5",
"del": "5.0.0",
"eslint": "6.1.0",
"eslint-config-google": "0.13.0",
"fancy-log": "1.3.3",
Expand All @@ -56,6 +55,7 @@
"gulp-git": "2.9.0",
"gulp-jasmine": "4.0.0",
"jasmine-core": "3.4.0",
"rimraf": "3.0.0",
"rollup": "1.19.4",
"rollup-plugin-commonjs": "10.0.2",
"rollup-plugin-node-resolve": "5.2.0",
Expand Down
8 changes: 5 additions & 3 deletions scripts/clean/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
* SOFTWARE.
*/

const del = require('del');
const rimraf = require('rimraf');
const config = require('../config');

module.exports = function clean() {
return del([config.dist]);
module.exports = function clean(done) {
rimraf(config.dist, (err) => (
done(err)
));
};
9 changes: 8 additions & 1 deletion scripts/lint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@

const path = require('path');
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const log = require('../log');
const config = require('../config');

module.exports = function lint() {
const nodeVersion = process.versions.node;
const major = Number(nodeVersion.split('.')[0]);
if (major < 8) {
log.debug(`Skipping ESLint because of node version compatibility (currenly in used: ${nodeVersion})`);
return Promise.resolve();
}

const eslint = require('gulp-eslint');
const src = [
path.join(config.root, '*.js'),
path.join(config.src, '**', '*.js'),
Expand Down

0 comments on commit 331ab8b

Please sign in to comment.