How to set a goal in cssmin task?

I'm trying cssmin for grunt

In accordance with the objectives of the docs can be defined "in accordance with the instructions for setting up tasks." When I create a cssmin task using this template, for example:

cssmin: { my_target: { minify: { src: 'path-to/default.css', dest: 'path-to/default.min.css' } } } 

a mini file is not created.

If I delete the target level, it works as expected. Am I doing something wrong here? or there are other options than cssmin (In my research, I chose this, since everyone pointed to it)

Using:

  • grunt v0.4.1
  • cssmin v0.6.0

Thanks in advance,

Thomas

+4
source share
1 answer

Your configuration is quite a bit. minify also the only target name. Do this instead:

 cssmin: { minify: { src: 'path-to/default.css', dest: 'path-to/default.min.css' } } 

OR

 cssmin: { my_target: { src: 'path-to/default.css', dest: 'path-to/default.min.css' } } 

Read http://gruntjs.com/configuring-tasks on how to configure tasks.

+15
source

Source: https://habr.com/ru/post/1482455/


All Articles