0

I have a setup where I use Libsass + SASSC to compile SASS files (hugely faster than the regular ruby compiler). It is working great, but I can't manage to generate a SourceMap.

The help (./sassc/bin/sassc -h) in the current version of SASSC says that if you want to emit a SourceMap you need to use '-m, --sourcemap' parameters, however a sourcemap is not generated.

I found this issue that is marked as resolved, but I have the problem anyway.

Any help would be greatly appreciated :)

Angel
  • 1
  • Have you set the type of output for the sourcemap? When I've needed to produce a sourcemap, I've always needed to put the following as a parameter `--sourcemap=file`, which will generate the file. – gabe3886 Jul 10 '15 at 08:34
  • When I try this: `/sassc/bin/sassc sass/styles.scss > css/styless.css --sourcemap=mysourcemap` i get the following error: `option '--sourcemap' doesn't allow an argument`. Am I doing it wrong? – Angel Jul 10 '15 at 08:52
  • literally `--sourcemap=file`. You don't change the `file` part. It's something I had a problem with a while back and made notes on – gabe3886 Jul 10 '15 at 08:55
  • I still get the same error message when i just type 'file' – Angel Jul 10 '15 at 08:56
  • Take a look at the article I worte on it (http://garybell.co.uk/blog/missing-sass-sourcemaps) and see if that can help. I don't know if the issue you're getting is because you're not using the ruby compiler though. Have you tried compiling it with the --sourcemap parameter in ruby? – gabe3886 Jul 10 '15 at 08:58
  • Yeah you are talking about the regular sass ruby compilator. Sassc has different options apparently. – Angel Jul 10 '15 at 09:23
  • Shame. Can you post the compile command you are using so we can see what you're trying and then see if there's an easy solution? – gabe3886 Jul 10 '15 at 09:29
  • Here is the compile command `/sassc/bin/sassc sass/styles.scss > css/styles.css -t compressed --sourcemap` I tried different variations of the sourcemap parameters but nothing works – Angel Jul 10 '15 at 10:05
  • Looking at http://hongminhee.org/libsass-python/sassc.html, you should be able to do: `/sassc/bin/sassc -t compressed --sourcemap sass/styles/scss css/styles.css` It's also worth noting that --sourcemap looks like it was added in version 0.4.0 (if I am reading the document right), so which version are you using? – gabe3886 Jul 10 '15 at 10:08
  • I'm using exactly this command with no luck :/ I have the latest version, 3.2.5, freshly installed – Angel Jul 10 '15 at 10:30
  • @Angel Apparently the command is `sassc --sourcemap`. Your generated sourcemap file will be `.map`. – nucleartide Oct 18 '15 at 22:20

0 Answers0