Skip to content
Snippets Groups Projects
Commit 26cb12b2 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] Skip js vendor deletion, when running 'gulp webExtBuild' without the --release option

parent 2e55e7ad
No related branches found
No related tags found
No related merge requests found
...@@ -637,12 +637,12 @@ function webCleanUnusedDirectories() { ...@@ -637,12 +637,12 @@ function webCleanUnusedDirectories() {
let patterns = [ let patterns = [
wwwPath + '/templates', wwwPath + '/templates',
wwwPath + '/js',
wwwPath + '/plugins' wwwPath + '/plugins'
]; ];
if (enableUglify) { if (enableUglify) {
patterns = patterns.concat([ patterns = patterns.concat([
wwwPath + '/js',
wwwPath + '/css', wwwPath + '/css',
wwwPath + '/dist', wwwPath + '/dist',
wwwPath + '/lib/*', wwwPath + '/lib/*',
...@@ -659,12 +659,14 @@ function webCleanUnusedDirectories() { ...@@ -659,12 +659,14 @@ function webCleanUnusedDirectories() {
} }
else { else {
patterns = patterns.concat([ patterns = patterns.concat([
wwwPath + '/js/*',
'!' + wwwPath + '/js/vendor',
wwwPath + '/dist_css', wwwPath + '/dist_css',
wwwPath + '/dist_js' wwwPath + '/dist_js'
]); ]);
} }
return gulp.src(patterns, {read: false}) return gulp.src(patterns, {read: false, allowEmpty: true})
//.pipe(debug({title: 'deleting '})) //.pipe(debug({title: 'deleting '}))
.pipe(clean()); .pipe(clean());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment