You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@shannonmoeller please correct me if I'm wrong but source maps are for CSS preprocessors only. And apparently clean-css makes smaller CSS from… larger CSS!
Source maps are for any JS or CSS files that are compiled from other source files. Because clean-css inlines @imports and modifies code to make it smaller than the source files, it qualifies! Consider your JS sister, uglifyjs. It only makes smaller JS files from larger JS files, and it supports generating source maps too!
When doing it please could you consider allowing passing in a source sourcemap as well? Uglifjs also allows this and I think If you use mozillas sourcemap library (on node) then it allows integrating it. I implemented css sourcemap support for less and it would be great to allow less to use clean css to compress the css and transform the sourcemap too.
I've been able to verify that SASS source maps work fine too. I'll merge the branch to master now so please open a new issue if you spot anything wrong about source maps.
Activity
GoalSmashers commentedon Aug 8, 2013
@shannonmoeller please correct me if I'm wrong but source maps are for CSS preprocessors only. And apparently clean-css makes smaller CSS from… larger CSS!
shannonmoeller commentedon Aug 9, 2013
Source maps are for any JS or CSS files that are compiled from other source files. Because clean-css inlines @imports and modifies code to make it smaller than the source files, it qualifies! Consider your JS sister, uglifyjs. It only makes smaller JS files from larger JS files, and it supports generating source maps too!
GoalSmashers commentedon Aug 9, 2013
Ah, sneaky
@imports! Challenge accepted :-)Kienz commentedon Oct 22, 2013
+1
Any news?
GoalSmashers commentedon Oct 22, 2013
@Kienz we have some other tasks in the pipeline but we won't leave it unanswered. The more +1's the quicker we get into it.
Subash commentedon Nov 14, 2013
+1 This will be one of the most useful feature.
iki commentedon Nov 15, 2013
+1, we'd prefer to use
--clean-cssfrom grunt less task, as it gives better results than--compress, but we need the source mapsGoalSmashers commentedon Nov 15, 2013
@iki @sbspk looks like we need to push it higher on the priorities list. Could be
2.1then.iki commentedon Nov 16, 2013
@GoalSmashers sounds great, count me in for testing if needed
Subash commentedon Nov 16, 2013
@GoalSmashers sounds awesome 👍 .
GoalSmashers commentedon Nov 16, 2013
@iki @sbspk thanks, will do!
lukeapage commentedon Nov 16, 2013
When doing it please could you consider allowing passing in a source sourcemap as well? Uglifjs also allows this and I think If you use mozillas sourcemap library (on node) then it allows integrating it. I implemented css sourcemap support for less and it would be great to allow less to use clean css to compress the css and transform the sourcemap too.
Subash commentedon Nov 17, 2013
@lukeapage You stole the words out of my mouth :D +1 for the suggestion.
GoalSmashers commentedon Nov 17, 2013
@lukeapage @sbspk Sure, I'll take a look into it!
139 remaining items
jakubpawlowicz commentedon Dec 8, 2014
I consider the initial version of source maps as ready for 3.0 unless someone finds any bug(s). 🍻
naartjie commentedon Dec 8, 2014
@jakubpawlowicz sure, I'm trying to get to it, I just ran into some problems this eve: #563 #565
naartjie commentedon Dec 8, 2014
When I changed
root: srcDirtotarget: srcDir, I lost the whole source map, i.e. just an empty skeleton gets generated.gerbenvandijk commentedon Dec 8, 2014
🍺 awesome! hope it ends up in the grunt-contrib-cssmin repo soon as well 👍
jakubpawlowicz commentedon Dec 9, 2014
@naartjie would you be able to share your code? I can take a look later today.
@gerbenvandijk it would be great indeed!
jakubpawlowicz commentedon Dec 9, 2014
I've been able to verify that SASS source maps work fine too. I'll merge the branch to master now so please open a new issue if you spot anything wrong about source maps.
naartjie commentedon Dec 10, 2014
I can also verify from my side, that SASS source maps in are working. Sorry it took a while.
👍 for merging it into master. Super cool.
Edit: just to be clear on this, I had to use version 3.0 of libsass for this to work, as it wasn't working on more recent libsass versions.
jakubpawlowicz commentedon Dec 10, 2014
Great, thanks @naartjie for the feedback!
naartjie commentedon Dec 10, 2014
Sure thing. Here is a self contained test, which should exemplify my understanding of it:
I'm sure I'm just doing something silly, or misunderstanding your instructions somehow. Thanks for looking into it.
jakubpawlowicz commentedon Dec 10, 2014
That's how you should do it, however you're missing a semicolon in import:
'@import url(my.css);'.naartjie commentedon Dec 10, 2014
Doh! that fixes it. Told you it was silly!! ;-) Thanks a mil!!
jakubpawlowicz commentedon Dec 10, 2014
:-) Cheers!
naartjie commentedon Dec 10, 2014
rhymes with... 🍻
jakubpawlowicz commentedon Dec 10, 2014
I'll sure have once 3.0 is out :-D