Node plugin (Gulp v.4) normally overwrites files, but in this case, he will not overwrite file in the destination folder, why?
function rew_front() {
return gulp.src( [ assets_front + '*.html'] )
.pipe(version({
'value' : '%DT%',
'append' : {
'key' : 'v',
'cover' : 0,
'to' : [
'css',
'js'
]
}
}))
.pipe(rename({
extname: '.latte',
}))
.pipe(cleanDest( app_front, {extension: '.latte'}))
.pipe(gulp.dest( app_front ))
}
Even when I add new plugin for clearing destination folder, which it should first delete all files in the destination folder, then that function rew_front
should create new files, but it not works.
If I will delete these files in destination folder by myself, and then I run rew_front
function, it will create correctly new files, but only this way.
Why it's not working? Is there a problem with PhpStorm, some kind of settings?
Update:
I found that problem is in pipe and plugin gulp-version-number
, where is applied version plugin, that plugin change every .html only, if MD5 is changed, but I need apply rewrite version everytime, even if .html is not change at all, just simply still changing version in links whenever I run that function
version = require( 'gulp-version-number' ),
.pipe(version({
'value' : '%DT%',
'append' : {
'key' : 'v',
'cover' : 0,
'to' : [
'css',
'js'
]
}
}))