paiq / blackcoffee

CoffeeScript + hygienic macros
MIT License
105 stars 9 forks source link

If compile more than one file at once, generated source maps are wrong. #16

Closed swayf closed 10 years ago

swayf commented 10 years ago

after

coffee -cm coffee*.coffee

source map looks like

{
  "version": 3,
  "file": "coffee2.js",
  "sourceRoot": "",
  "sources": [
    "blablabla/coffee1.coffee",
    "blablabla/coffee2.coffee"
  ],
  "names": [],
  "mappings": ";ACAA;AAAA,EAAA,OAAO,CAAC,GAAR,CAAY,IAAZ,CAAA,CAAA;AAAA"
}

but sources should be only coffee2.coffee

vanviegen commented 10 years ago

Yeah, it does that. I'm afraid that's not easily fixed. It's easy enough to work around though, I suppose: for c in *.coffee ; do coffee -cm $c ; done.

I'll close this as a wontfix. Sorry!

swayf commented 10 years ago

in this case it cannot be used as "almost in-place" alternative for coffeescript with grunt-contrib-coffee and so on...
it's a pity, that only because of that, all of the coffeescript infrastructure should be "workarounded" every time.