sourceMap option documentation is inaccurate
:rainbow: Node.js bindings to libsass
Brought to you by:
imran1012000k
Originally created by: nex3
The documentation for the sourceMap
option claims that
Setting the
sourceMap
option requires also setting theoutFile
option
However, in practice, if you set sourceMap
to a string and don't set outFile
, you still get a map
buffer in the result. For example:
var sass = require('node-sass'); var result = sass.renderSync({ data: 'a {b: c}', sourceMap: 'out.css.map' }); console.log(result.map.toString());
prints
{ "version": 3, "file": "stdin.css", "sources": [ "stdin" ], "names": [], "mappings": "AAAA,AAAA,CAAC,CAAC;EAAC,CAAC,EAAE,CAAC,GAAE" }