S
S
Sergey Shilov2016-04-13 21:41:27
css
Sergey Shilov, 2016-04-13 21:41:27

How to do concat css in grunt?

I do not use preprocessors in the project, so my task is to simply combine all css files into one and minify it. What to use?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Bogachev, 2016-04-13
@Olivoin

There is a corresponding plugin that can take css files, merge into one and minify.

A
Alexander, 2016-04-13
@lasmaster

I used the grunt-contrib-concat plugin for concatenation, combined js / css files with it. To minify css, I used the grunt-csswring plugin, for js - grunt-contrib-uglify. I advise you to pay attention to the sourceMap option when minimizing, it allows you to create maps so that developers can see the normal css / js code in the DevTool, and not the minimized one, but upload to production already without a map, only minimized files. If you wish, look further towards Gulp, it will be more interesting at the moment than Grunt.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question