Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

iki opened this issue Nov 15, 2013 · 17 comments

Comments

@iki
Copy link

iki commented Nov 15, 2013

  • clean-css does not currently support source maps, so the generated map is most probably incorrect: Source Maps clean-css/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.

@lukeapage
Copy link
Member

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

@WraithKenny
Copy link

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

@lukeapage
Copy link
Member

ah sorry, will correct

@lukeapage
Copy link
Member

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

@pengyan518
Copy link

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

@SpencerCarstens
Copy link

+1

1 similar comment
@dotnetwise
Copy link

+1

dotnetwise pushed a commit to dotnetwise/less_watch that referenced this issue Jul 25, 2014
@redfox05
Copy link

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?

@lukeapage
Copy link
Member

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

@redfox05
Copy link

Excellent. Good to hear. And thanks for the quick reply.
On 20 Nov 2014 17:49, "Luke Page" [email protected] 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).

@lukeapage
Copy link
Member

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

@bdkjones
Copy link

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

@seven-phases-max
Copy link
Member

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

@bdkjones
Copy link

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.

@lukeapage
Copy link
Member

Sorry, its no longer in beta, its out.

@redfox05
Copy link

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" [email protected] wrote:

Sorry, its no longer in beta, its out.


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

@lukeapage
Copy link
Member

lukeapage commented Mar 20, 2015 via email

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

No branches or pull requests

9 participants