clean-css / clean-css

Fast and efficient CSS optimizer for node.js and the Web
https://clean-css.github.io/
MIT License
4.17k stars 323 forks source link

Source Maps #125

Closed shannonmoeller closed 9 years ago

shannonmoeller commented 11 years ago

Would be awesome to have sourceMap support.

https://developers.google.com/chrome-developer-tools/docs/css-preprocessors#toc-css-preprocessor-support

GoalSmashers commented 11 years ago

@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 commented 11 years ago

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 commented 11 years ago

Ah, sneaky @imports! Challenge accepted :-)

Kienz commented 11 years ago

+1 Any news?

GoalSmashers commented 11 years ago

@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 commented 11 years ago

+1 This will be one of the most useful feature.

iki commented 11 years ago

+1, we'd prefer to use --clean-css from grunt less task, as it gives better results than --compress, but we need the source maps

GoalSmashers commented 11 years ago

@iki @sbspk looks like we need to push it higher on the priorities list. Could be 2.1 then.

iki commented 10 years ago

@GoalSmashers sounds great, count me in for testing if needed

Subash commented 10 years ago

@GoalSmashers sounds awesome :thumbsup: .

GoalSmashers commented 10 years ago

@iki @sbspk thanks, will do!

lukeapage commented 10 years ago

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 commented 10 years ago

@lukeapage You stole the words out of my mouth :D +1 for the suggestion.

GoalSmashers commented 10 years ago

@lukeapage @sbspk Sure, I'll take a look into it!

joshuaspence commented 10 years ago

+1

cpixl commented 10 years ago

+1 Really nice feature! :)

ScottSmith95 commented 10 years ago

Looking forward to this an willing to help test out in any way I can.

paazmaya commented 10 years ago

:+1:

OliverJAsh commented 10 years ago

I'm not sure how this can be done without an AST (and clean-css doesn't create one). Any thoughts @GoalSmashers?

LESS does create a source map, so it might be worth looking at what they're doing for compressing.

GoalSmashers commented 10 years ago

@OliverJAsh I've been thinking a lot about it and we may need an AST-like structure to add source maps but there could be another option as well. Need to play a bit more with it to see what fits the best.

dypsilon commented 10 years ago

+1

jberube commented 10 years ago

+1

victormejia commented 10 years ago

+1 This feature would be sooooo useful!

gbmoretti commented 10 years ago

+1

octavioamu commented 10 years ago

+1

frodeknutsen commented 10 years ago

+1

jfly commented 10 years ago

+1

rwaldin commented 10 years ago

+1 for sourcemaps out +1 for sourcemaps in

ScottSmith95 commented 10 years ago

+1

hamsterbacke23 commented 10 years ago

+1

Oxicode commented 10 years ago

:+1:

ajmichels commented 10 years ago

+1

mikebranski commented 10 years ago

Throwing in my :+1: in support of this. :)

mgedmin commented 10 years ago

+1

paprende commented 10 years ago

+1

lnfnunes commented 10 years ago

+1

djanix commented 10 years ago

+1

alana314 commented 10 years ago

+1 for use with cssmin (https://github.com/gruntjs/grunt-contrib-cssmin/issues/58)

GoalSmashers commented 10 years ago

To give you all a short update, the work on source maps is slowly progressing and it should be available for testing in the coming weeks.

I'll likely make 2.3 release solely for source maps as other updates waiting for 2.2 are unnecessarily collecting the dust.

Stay tuned!

cwygoda commented 10 years ago

Nice news. Keep up the good work!

sciascia commented 10 years ago

Great news, looking forward to it! Cheers

jsilvestre commented 10 years ago

Thanks for the future feature, big :+1:!

adrigen commented 10 years ago

+1

mnpenner commented 10 years ago

:+1:

mderrick commented 10 years ago

+1

aaronlademann-wf commented 10 years ago

+1

Oxicode commented 10 years ago

+1

dmitriy-tkalich commented 10 years ago

:+1:

ghost commented 10 years ago

+1

setvik commented 10 years ago

Big :+1:!