I've hit a roadblock in trying to resolve my search and google issue.
My current challenge involves Gulp and cssmin. I can't seem to pinpoint the cause of an error. My aim is to have both the original CSS files and their minified versions in the same folder without concatenation. Here's my Gulp task code:
gulp.task("min:css", function ()
{
return gulp.src([paths.css, "!" + paths.minCss], { base: "." })
.pipe(cssmin())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('.'));
});
The error that arises after running the task is as follows:
[13:30:47] Starting 'min:css'...
[13:30:49] 'min:css' errored after 1.59 s
[13:30:49] Error: EPERM: operation not permitted, open '%file location%\bootstrap-theme.min.css' at Error (native)
Update: Upon removing the bootstrap-theme.min.css file, a different error surfaced. It appears that the task cannot overwrite existing min.css files.
Update: I managed to get it working by deleting all .min.css files before building and then running the task post-build. Not the most ideal solution in my opinion.
Is there a way to execute the command without requiring manual deletion of all min.css files beforehand?