Skip to content

Commit e822d36

Browse files
committed
Update building system.
1 parent 7a195bb commit e822d36

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ npm-debug.log
2020

2121
*.zip
2222
*.gz
23+
24+
dist/*.*

gulpfile.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,20 @@ const myPath = {
1111
}
1212
const FILENAME = 'zero'
1313

14-
gulp.task('clean', function (cb) {
15-
del([
14+
gulp.task('clean', function () {
15+
return del([
1616
path.join(myPath.dist, '*.*'),
17-
], {
18-
force: true
19-
}, function (err, deletedFiles) {
17+
]).then(function (deletedFiles) {
2018
var infoTitle = '[clean] deleted: '
2119
if (deletedFiles.length) {
2220
console.log(infoTitle)
23-
console.log(deletedFiles.join('\n'))
21+
deletedFiles.forEach(function (item) {
22+
item = path.relative(__dirname, item)
23+
console.log(' - ' + item)
24+
})
2425
} else {
2526
console.log(infoTitle + '(no files).')
2627
}
27-
28-
cb()
2928
})
3029
})
3130

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"devDependencies": {
2121
"gulp": "github:gulpjs/gulp#4.0",
22-
"del": "1.*",
22+
"del": "2.*",
2323
"gulp-stylus": "2.*"
2424
}
2525
}

0 commit comments

Comments
 (0)