`--clean-css` option is not compatible with `--source-map` #1656

Closed
iki opened this Issue Nov 15, 2013 · 17 comments

Comments

Projects
None yet
9 participants

iki commented Nov 15, 2013

  • clean-css does not currently support source maps, so the generated map is most probably incorrect: GoalSmashers/clean-css#125
  • clean-css also strips (or does not insert) the /*# sourceMappingURL= comment.

Example: compare
lessc --compress --source-map style.less style.min.css
with
lessc --clean-css --source-map style.less style.min.css.

It would make sense to exit with an error when both options are specified by user on command line, or throw an error if called from js, e.g. from grunt-contrib-less.

Owner

lukeapage commented Nov 16, 2013

okay, now will show an error if you use them.

The error says "sourcemap" twice instead of mentioning "cleancss"

Owner

lukeapage commented Nov 18, 2013

ah sorry, will correct

jmeas referenced this issue in gruntjs/grunt-contrib-less Jan 25, 2014

Closed

soucemaps url not appearing in css file? #133

@stevenvachon stevenvachon referenced this issue in nanotronic/can-boilerplate Mar 14, 2014

@nanotronic nanotronic Update compile.js
comment out sourceMaoName in uglify task
931503f
Owner

lukeapage commented May 4, 2014

No. Clean css are working on sourcemap support though and once they are
finished we can make this a yes.

Really hope soucemap will work with "Clean css "!
Sass could do it,
i hope less could do so too!

+1

@adaptabi adaptabi pushed a commit to adaptabi/less_watch that referenced this issue Jul 25, 2014

Laurenţiu Macovei Dropped --clean-css as per less/less.js#1656 4153a03

Still finding this an issue, using it through CodeKit Compress option, but wont compress and use sourcemaps at the same time. Says to check this issue.
"Note: the Less compiler currently can not write a source map when the 'Compressed' output style is selected. No source map was created. (See issue #1656 on the Less.js GitHub page.)"

Any plans for this to be addressed?

Owner

lukeapage commented Nov 20, 2014

Clean css are adding support and we are working with them. They are in
beta, so probably not long..

Excellent. Good to hear. And thanks for the quick reply.
On 20 Nov 2014 17:49, "Luke Page" notifications@github.com wrote:

Clean css are adding support and we are working with them. They are in
beta, so probably not long..


Reply to this email directly or view it on GitHub
#1656 (comment).

Owner

lukeapage commented Nov 28, 2014

If people want to test the new clean-css sourcemaps in less, use less v2.1.1 (latest) and wherever you reference the clean-css plugin (whether in your package or just installed locally, use this..
git://github.com/less/less-plugin-clean-css.git#0be586d2b9ed8004f19078fbf293d96df0ab2dc0

e.g.

npm install -g git://github.com/less/less-plugin-clean-css.git#0be586d2b9ed8004f19078fbf293d96df0ab2dc0
npm install -g less
lessc in.less out.css --clean-css --source-map

So... any word on this? It's been months.

Owner

seven-phases-max commented Mar 20, 2015

@bdkjones Read the post right above yours: update clean-css installed with less-plugin-clean-css to the latest version and you're there.

I read the entire thread, thanks. The post above mine implies that it's in beta. ("[...] if people want to test [...]") I'm looking for confirmation that this is ready for use in production.

Owner

lukeapage commented Mar 20, 2015

Sorry, its no longer in beta, its out.

lukeapage closed this Mar 20, 2015

If its out of beta then that's a good thing then? Does that mean it's fixed?
On 20 Mar 2015 06:33, "Luke Page" notifications@github.com wrote:

Sorry, its no longer in beta, its out.


Reply to this email directly or view it on GitHub
#1656 (comment).

Owner

lukeapage commented Mar 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment