sass / node-sass

:rainbow: Node.js bindings to libsass
https://npmjs.org/package/node-sass
MIT License
8.51k stars 1.32k forks source link

CLI Source Map issue #573

Closed roryashfordbentley closed 9 years ago

roryashfordbentley commented 9 years ago

Trying to get sourcemaps working using the following command line args:

node-sass --output-style compressed --source-map assets/sass/style.scss style.css

My css file is created as is style.map.css which is also referenced in the CSS file, so far so good. When I try to use the sourcemap in Chrome (latest release) it doesn't recognise it, so I started exsperimenting.

I noticed by adding a path following the --source-map creates a sourcemap with a differnt filename e.g.

node-sass --output-style compressed --source-map test.css.map assets/sass/style.scss style.css.

The new file test.css.map is created and has different output to the default style.css.map file.

style.css.map (created without --source-map additional filename arg) output:

{"version":3,"sources":["style.css"],"names":[],"mappings":"AAAA,gBAAgB,cAAc,CAAA,oBAAqB,CAAA,oBAAqB,CAAA,sHAAA,CAA8G,8GAAA,AAAC,CAAA,SAAU,cAAc,CAAA,oBAAqB,CAAA,sHAAA,CAA8G,8GAAA,AAAC,CAAA,CAAE,SAAS,CAAA,SAAU,CAAA,iBAAkB,CAAA,qBAAqB,AAAC,CAAA,iCAAkC,sBAAqB,AAAC,CAAA,QAAS,cAAa,AAAC,CAAA,0BAA2B,SAAS,UAAU,CAAA,iBAAiB,CAAC,AAAC,CAAA,0BAA2B,gBAAgB,UAAU,CAAA,iBAAiB,CAAC,AAAC,CAAA,KAAM,qBAAoB,OAAO,AAAC,CAAA,wBAAyB,WAAW,CAAA,aAAa,AAAC,CAAA,WAAY,WAAU,AAAC,CAAA,OAAQ,WAAW,CAAA,iBAAkB,CAAA,mBAAmB,AAAC,CAAA,gBAAiB,cAAa,AAAC,CAAA,kBAAmB,eAAc,AAAC,CAAA,WAAY,eAAc,AAAC,CAAA,sBAAuB,gBAAe,AAAC,CAAA,sBAAuB,UAAS,AAAC,CAAA,iCAAkC,gBAAe,AAAC,CAAA,WAAY,gBAAe,AAAC,CAAA,4CAA6C,UAAS,AAAC,CAAA,WAAY,gBAAe,AAAC,CAAA,iCAAkC,gBA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": "style.css",
    "sources": [
        "assets/sass/style.scss",
        "assets/sass/partial/_gridtacular.scss",
        "assets/sass/partial/_rem.scss",
        "assets/sass/partial/__base.scss",
        "assets/sass/partial/__colours.scss",
        "assets/sass/partial/_links.scss",
        "assets/sass/partial/_fluid-bg.scss",
        "assets/sass/partial/_aspect-ratios.scss",
        "assets/sass/modules/_reset.scss",
        "assets/sass/modules/_grid-setup.scss",
        "assets/sass/modules/_typography.scss",
        "assets/sass/modules/_buttons.scss",
        "assets/sass/modules/_clear.scss",
        "assets/sass/modules/_forms.scss",
        "assets/sass/modules/_imgs.scss",
        "assets/sass/modules/_navigation.scss",
        "assets/sass/modules/_tables.scss",
        "assets/sass/modules/_wordpress.scss",
        "assets/sass/modules/_wireframe.scss",
        "assets/sass/section/_html-body.scss",
        "assets/sass/section/_header.scss",
        "assets/sass/section/_footer.scss",
        "assets/sass/section/_sidebar.scss",
        "assets/sass/section/_belt.scss",
        "assets/sass/section/_box.scss",
        "assets/sass/section/_billboard.scss"
    ],
    "sourcesContent": [],
    "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+xBKAO,EAAE,EAAG,EAAE,CAAC,SAIX,MDMoB,QCLpB,gBAAiB,KACjB,QAAS,aACT,iBAAkB,+FAAT,EAAE,CAAC,OAGR,MDJgB,QCKhB,gBAAiB,KACjB,iBAAkB,+FGN1B,EACI,OAAQ,EACR,QAAS,EACT,SAAU,SAGN,WAAY,YAUpB,MAAO,OAAQ,OAAQ,IAAK,IAAK,MAM7B,eAAgB,QChBpB,SACI,OAAQ,QR+CJ,2BQhDR,SAGQ,MAAO,IACP,UAAW,SR4CX,2BQxCR,gBAEY,MAAO,IACP,UAAW,SRqEvB,MAEQ,YAqOa,QAxTjB,MAAM,GAAV,KAAK,QAAS,KAAK,OAEX,QAAQ,GACR,QAAQ,OAChB,KAAK,OACS,MAAM,MAgFpB,MAAQ,EAII,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ACT,QAAS,OACT,gBAAiB,MCvC7B,KACI,UhBuCoB,MgBnCpB,YhB6BoB,KFoBhB,0BkBtDR,KAE4C,UhBuCpB,QFahB,2BkBtDR,KAG2C,UhBuCnB,QFYhB,2BkBtDR,KAIgD,UhBuCxB,MgBnCxB,KACQ,MfLgB,QeMhB,YhBmDgB,2BgBlDhB,uBAAwB,aINhC,MACI,QAAS,ItBgDL,0BsBjDR,MAGQ,QtBqTa,SsBjTrB,aACQ,QAAS,ItByCT,0BsB1CR,aAGW,QAAS,SAIpB,iBACQ,WAAY,SAGpB,UjBjBI,kBAAmB,UACnB,gBAAiB,MACjB,oBAAqB,ekBNzB,KACI,QvB0TiB,OuBzTjB,OAAQ,cvBkDJ,0BuBpDR,KAIQ,OAAc,WAItB,SAGQ,WAAY,MAGpB,WAEQ,OAAQ,GvBoCR,0BuBtCR,WAIW,OAAc,eCnBzB,WACI,SAAU,SACV,gBAAiB,YnBGjB,kBAAmB,UACnB,gBAAiB,MACjB,oBAAqB,emBLzB,WAAW,IACF,MAAO,MlBFhB,UAAU,OAGF,YAAc,IACd,QAAS,MACT,QAAS,IkBEjB,oBACQ,SAAU,SACV,IAAK,EACL,MAAO,KxB0CP,0BwB7CR,oBAKW,MAAO,MAIlB,4BAEY,IAAK,IACL,KAAM,IACN,UAAW",
    "names": []
}

There is a big difference between the two. I noticed that if I do add the custom filename that it isn't reflected in the stylesheet which still has /*# sourceMappingURL=style.css.map */at the bottom rather than pointing to the newly named/created file.

I have also observed that if I point the CSS file to the newly named test.css.map that it works perfectly in Chrome. This all maybe because I am jumping the gun using features not fully documented in v1.2.3.

davemac commented 9 years ago

Also see https://github.com/sindresorhus/grunt-sass/issues/166#issuecomment-67292321

am11 commented 9 years ago

v2.0.0-beta is just released with some source-map improvements and new options introduced. Please test and let us know if this issue still persist.

fourseven commented 9 years ago

Hi @am11 - I'm prepping meteor-scss for the new version, since I've never managed to get sourcemaps working, but I'm experiencing issues with the 2.0.0-beta. Given a very simple input file

// meteor-scss-test.scss
@import "imports";
/* CSS declarations go here */
body {
  background-color: blue;
  p {
    font-size: $font-size;
  }
}
// _imports.scss
$font-size: 100px;

Typing node-sass --output-style compressed --source-map out.map.css meteor-scss-test.scss out.css gives a out.map.css file containing:

[object Object]
am11 commented 9 years ago

@fourseven, I can reproduce this bug. It is coming from https://github.com/sass/node-sass/blob/974f93e76ddd08ea850e3e663cfe64bb6a059dd3/lib/render.js#L63. Changing it to

fs.writeFile(options.sourceMap, JSON.stringify(result.map), function(err) {

will fix it.

I am debugging other things at the moment. Will push the fix momentarily. We will probably have beta2 soon. Meanwhile, you can manually apply the aforementioned fix in render.js.

Thanks for reporting the issue. :+1:

fourseven commented 9 years ago

Thanks @am11 - Trying to inject that sort of fix though meteor.js sounds like a world of pain, so I'll wait for the next published beta and will open anything if I run into other issues. I like the new API, makes heaps more sense, nice!

am11 commented 9 years ago

@fourseven, that bug is fixed by 9fbb239 via https://github.com/sass/node-sass/pull/583. Credit goes to @didoarellano. :congratulations:

am11 commented 9 years ago

This issue is fixed in v2.0.0.

fourseven commented 9 years ago

You released v2.0.0? SWEET! :tada: :balloon:

am11 commented 9 years ago

Yay! Checkout the release notes: https://github.com/sass/node-sass/releases/tag/v2.0.0. :)