GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Source Maps · Issue #125 · clean-css/clean-css

Source Maps #125

New issue
Copy link
New issue
Copy link
Closed
Closed
Source Maps#125
Copy link
Assignees
jakubpawlowicz
Milestone
3.0

Description

@shannonmoeller
shannonmoeller
opened on Aug 8, 2013
Issue body actions

Would be awesome to have sourceMap support.

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

Activity

Next
  1. GoalSmashers commented on Aug 8, 2013

    @GoalSmashers
    GoalSmashers
    on Aug 8, 2013
    Contributor
    More actions

    @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!

  2. shannonmoeller commented on Aug 9, 2013

    @shannonmoeller
    shannonmoeller
    on Aug 9, 2013
    Author
    More actions

    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!

    Reacted by Jono
  3. GoalSmashers commented on Aug 9, 2013

    @GoalSmashers
    GoalSmashers
    on Aug 9, 2013
    Contributor
    More actions

    Ah, sneaky @imports! Challenge accepted :-)

  4. ghost assigned
    GoalSmashers
    on Aug 9, 2013
  5. Kienz commented on Oct 22, 2013

    @Kienz
    Kienz
    on Oct 22, 2013
    More actions

    +1
    Any news?

  6. GoalSmashers commented on Oct 22, 2013

    @GoalSmashers
    GoalSmashers
    on Oct 22, 2013
    Contributor
    More actions

    @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.

  7. Subash commented on Nov 14, 2013

    @Subash
    Subash
    on Nov 14, 2013
    More actions

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

  8. iki commented on Nov 15, 2013

    @iki
    iki
    on Nov 15, 2013
    More actions

    +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

  9. GoalSmashers commented on Nov 15, 2013

    @GoalSmashers
    GoalSmashers
    on Nov 15, 2013
    Contributor
    More actions

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

  10. iki commented on Nov 16, 2013

    @iki
    iki
    on Nov 16, 2013
    More actions

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

  11. Subash commented on Nov 16, 2013

    @Subash
    Subash
    on Nov 16, 2013
    More actions

    @GoalSmashers sounds awesome 👍 .

  12. GoalSmashers commented on Nov 16, 2013

    @GoalSmashers
    GoalSmashers
    on Nov 16, 2013
    Contributor
    More actions

    @iki @sbspk thanks, will do!

  13. lukeapage commented on Nov 16, 2013

    @lukeapage
    lukeapage
    on Nov 16, 2013
    Contributor
    More actions

    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.

  14. Subash commented on Nov 17, 2013

    @Subash
    Subash
    on Nov 17, 2013
    More actions

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

  15. GoalSmashers commented on Nov 17, 2013

    @GoalSmashers
    GoalSmashers
    on Nov 17, 2013
    Contributor
    More actions

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

  16. 139 remaining items

  17. jakubpawlowicz commented on Dec 8, 2014

    @jakubpawlowicz
    jakubpawlowicz
    on Dec 8, 2014
    Collaborator
    More actions

    I consider the initial version of source maps as ready for 3.0 unless someone finds any bug(s). 🍻

  18. naartjie commented on Dec 8, 2014

    @naartjie
    naartjie
    on Dec 8, 2014
    More actions

    give SASS + clean-css a try

    @jakubpawlowicz sure, I'm trying to get to it, I just ran into some problems this eve: #563 #565

  19. naartjie commented on Dec 8, 2014

    @naartjie
    naartjie
    on Dec 8, 2014
    More actions

    use target option pointing to a directory

    When I changed root: srcDir to target: srcDir, I lost the whole source map, i.e. just an empty skeleton gets generated.

  20. gerbenvandijk commented on Dec 8, 2014

    @gerbenvandijk
    gerbenvandijk
    on Dec 8, 2014
    More actions

    🍺 awesome! hope it ends up in the grunt-contrib-cssmin repo soon as well 👍

  21. jakubpawlowicz commented on Dec 9, 2014

    @jakubpawlowicz
    jakubpawlowicz
    on Dec 9, 2014
    Collaborator
    More actions

    @naartjie would you be able to share your code? I can take a look later today.
    @gerbenvandijk it would be great indeed!

  22. jakubpawlowicz commented on Dec 9, 2014

    @jakubpawlowicz
    jakubpawlowicz
    on Dec 9, 2014
    Collaborator
    More actions

    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.

  23. jakubpawlowicz
    closed this as completedon Dec 9, 2014
  24. naartjie commented on Dec 10, 2014

    @naartjie
    naartjie
    on Dec 10, 2014
    More actions

    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.

  25. jakubpawlowicz commented on Dec 10, 2014

    @jakubpawlowicz
    jakubpawlowicz
    on Dec 10, 2014
    Collaborator
    More actions

    Great, thanks @naartjie for the feedback!

  26. naartjie commented on Dec 10, 2014

    @naartjie
    naartjie
    on Dec 10, 2014
    More actions

    @naartjie would you be able to share your code? I can take a look later today.

    Sure thing. Here is a self contained test, which should exemplify my understanding of it:

    var fs = require('fs');
    var CleanCss = require('clean-css');
    
    fs.writeFileSync('./my.css', 'body {color:red;}');
    
    var cleanCss = new CleanCss({ sourceMap: true, target: process.cwd() });
    var out = cleanCss.minify('@import url(my.css)').sourceMap.toString();
    
    // out = {"version":3,"sources":[],"names":[],"mappings":""}

    I'm sure I'm just doing something silly, or misunderstanding your instructions somehow. Thanks for looking into it.

  27. jakubpawlowicz commented on Dec 10, 2014

    @jakubpawlowicz
    jakubpawlowicz
    on Dec 10, 2014
    Collaborator
    More actions

    That's how you should do it, however you're missing a semicolon in import: '@import url(my.css);'.

  28. naartjie commented on Dec 10, 2014

    @naartjie
    naartjie
    on Dec 10, 2014
    More actions

    missing a semicolon

    Doh! that fixes it. Told you it was silly!! ;-) Thanks a mil!!

  29. jakubpawlowicz commented on Dec 10, 2014

    @jakubpawlowicz
    jakubpawlowicz
    on Dec 10, 2014
    Collaborator
    More actions

    :-) Cheers!

  30. naartjie commented on Dec 10, 2014

    @naartjie
    naartjie
    on Dec 10, 2014
    More actions

    Cheers!

    rhymes with... 🍻

  31. jakubpawlowicz commented on Dec 10, 2014

    @jakubpawlowicz
    jakubpawlowicz
    on Dec 10, 2014
    Collaborator
    More actions

    I'll sure have once 3.0 is out :-D

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

Metadata

Metadata

Assignees

  • @jakubpawlowicz
    jakubpawlowicz

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    • 3.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402792 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.