/
githubmirror
/
nest
Обзор
Документация
Войти
/
githubmirror
/
nest
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tools/gulp/tasks/clean.ts
33 строки
696 B
Livio
build(): Refactor Gulpfile to TS
07 авг 2019, 23:08
Не верифицирован
07 авг 2019, 23:08
0686162
Код
Авторство
О чём код?
import { task, src, series } from 'gulp'; import { source } from '../config'; import * as clean from 'gulp-clean'; import * as deleteEmpty from 'delete-empty'; /** * Cleans the build output assets from the packages folders */ function cleanOutput() { return src( [ `${source}/**/*.js`, `${source}/**/*.d.ts`, `${source}/**/*.js.map`, `${source}/**/*.d.ts.map`, ], { read: false, }, ).pipe(clean()); } /** * Cleans empty dirs */ function cleanDirs(done: () => void) { deleteEmpty.sync(`${source}/`); done(); } task('clean:output', cleanOutput); task('clean:dirs', cleanDirs); task('clean:bundle', series('clean:output', 'clean:dirs'));