Skip to content

Commit e066be9

Browse files
committed
refactor(gulp): use del instead of gulp-clean
1 parent bcc8fdc commit e066be9

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Diff for: app/templates/_package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
"devDependencies": {
3939
"autoprefixer": "^6.0.0",
4040
"babel-core": "^5.6.4",<% if(filters.gulp) { %>
41+
"del": "^2.0.2",
4142
"gulp": "^3.9.0",
4243
"gulp-add-src": "^0.2.0",
4344
"gulp-angular-templatecache": "^1.7.0",
4445
"gulp-autoprefixer": "2.3.1",<% if(filters.babel) { %>
4546
"gulp-babel": "^5.1.0",<% } %>
4647
"gulp-cache": "^0.2.10",
47-
"gulp-clean": "^0.3.1",
4848
"gulp-concat": "^2.6.0",
4949
"gulp-filter": "^2.0.2",
5050
"gulp-imagemin": "^2.2.1",

Diff for: app/templates/gulpfile.babel(gulp).js

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
'use strict';
33

44
import _ from 'lodash';
5+
import del from 'del';
56
import gulp from 'gulp';
67
import path from 'path';
78
import gulpLoadPlugins from 'gulp-load-plugins';
@@ -233,10 +234,7 @@ gulp.task('lint:scripts:server', () => {
233234
.pipe(lintServerScripts());
234235
});
235236

236-
gulp.task('clean:tmp', () => {
237-
return gulp.src('.tmp', {read: false})
238-
.pipe(plugins.clean());
239-
});
237+
gulp.task('clean:tmp', () => del(['.tmp/**/*']));
240238

241239
gulp.task('start:client', cb => {
242240
whenServerReady(() => {
@@ -383,7 +381,7 @@ gulp.task('build', cb => {
383381
cb);
384382
});
385383

386-
gulp.task('clean:dist', () => gulp.src('dist', {read: false}).pipe(plugins.clean()));
384+
gulp.task('clean:dist', () => del(['dist/**/*']));
387385

388386
gulp.task('build:client', ['transpile:client', 'styles', 'html'], () => {
389387
var appFilter = plugins.filter('**/app.js');

0 commit comments

Comments
 (0)