Gulp minify-css only for distribution -


How can I generate CSS in a lower than just 'dist' folder? Of course all Gulp plugins are corretly installed. Everything is fine except for reducing CSS. Here's my code:

  Gulppasskas ('styles', function) (return gulp.src ('app / less / *.' '.') .pipe ($. () .pipe (Gulp.dest ('.tmp / styles')) .pip (minify css ({keepBreaks: false}) .pipe (gulp.dest ('dist / styles'))});  

If I move .pipe (minifyCSS ({keepBreaks: false}) one line works on it but I want to make CSL compressed

Thanks for the advice.

This is not the best way Maybe, but I use two different fiction works, a task that compiles CSS into my build directory and then takes another output and it's mine The task opens up in the directory. Use the job dependency to ensure work dependency that the file is created before running the least amount of work.

  gulp.task ('styles', Function () {return gulp.src (styles) .pipe (concat ('App.less')) .pipe (gulp.dest ('. / Build / styles')) .pipe (low ()) .on (' Error ', console.log) .pip (concat (' app.css')) .pipe (gulp.dest ('./ build / styles'))}}; Gulp.task (' styles-distribution ', [ 'Style'], function () {return gulp.src ('build / styles / app.css') .pipe (minifycss ()) .pipe (gulp.dest ('./dist/styles'))}} ;  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -