-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (33 loc) · 844 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const gulp = require('gulp');
const del = require('del');
async function clean(cb) {
const arr = [
'{routes,specs,types,docs,__mocks__,models}/**',
'*.md',
'LICENSE',
'*.{js,ts,tsx}',
'client/**',
'client/.storybook',
'Dockerfile',
'docker-compose.yml',
'tsconfig.json',
'nodemon.json',
'docker.sh',
'!**/package-lock.json',
'!**/package.json',
'!node_modules/**',
'!Procfile',
'!dist/**',
'!gulpfile.js',
'!assets/**',
'!config/**/config.js'
];
const deletedPaths = await del(arr, { dryRun: false });
console.log('Files and directories that would be deleted:\n', deletedPaths.join('\n'));
cb();
}
function noTask(cb) {
console.log('No tasks queued up');
cb();
}
exports.default = gulp.series(process.env.NODE_ENV === 'production' ? clean : noTask);