Skip to content
This repository was archived by the owner on Jul 14, 2020. It is now read-only.

Commit 06802c7

Browse files
committed
Replace gulp-clean with del, Empty dist/ instead of removing
1 parent 9ed4d10 commit 06802c7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"babel-loader": "^6.2.4",
1414
"babel-plugin-transform-runtime": "^6.9.0",
1515
"babel-preset-es2015": "^6.9.0",
16+
"del": "^2.2.1",
1617
"eslint": "^2.13.1",
1718
"eslint-config-airbnb": "^9.0.1",
1819
"eslint-plugin-import": "^1.9.2",
@@ -22,7 +23,6 @@
2223
"gulp": "^3.9.1",
2324
"gulp-autoprefixer": "^3.1.0",
2425
"gulp-changed": "^1.3.0",
25-
"gulp-clean": "^0.3.1",
2626
"gulp-concat": "^2.6.0",
2727
"gulp-cssnano": "^2.1.2",
2828
"gulp-debug": "^2.1.2",

tasks/clean.js

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

33
const configuration = require('../lib/gulp/configuration');
4+
const del = require('del');
45
const path = require('path');
56
const plugins = require('../lib/gulp/plugins').read()
67
const tasks = require('../lib/gulp/tasks');
78

89
module.exports = (gulp, projectArguments) => {
910
let config = configuration.merge(configuration.default(), projectArguments.config);
10-
let options = {
11-
read: false,
12-
};
1311

14-
return gulp.src(config.dist_dir, options)
15-
.pipe(plugins.clean());
12+
return del([
13+
path.join(config.dist_dir, '**/*'),
14+
])
1615
};

0 commit comments

Comments
 (0)