karma-runner / karma-coffee-preprocessor

A Karma plugin. Compile coffee script on the fly.
MIT License
53 stars 34 forks source link

transformPath in Readme is wrong? #16

Closed ehuss closed 10 years ago

ehuss commented 10 years ago

I may be completely misunderstanding how things work. The sample config in the README shows transformPath as:

      transformPath: function(path) {
        return path.replace(/\.js$/, '.coffee');
      }

However, it seems like the .js and .coffee are swapped. Using it this way I get a lot of Uncaught SyntaxErrors from Karma for each coffeescript file. If I switch it around (or just leave it out completely), then things just work. Should it be like this (or am I confused?):

      transformPath: function(path) {
        return path.replace(/\.coffee$/, '.js');
      }
vojtajina commented 10 years ago

Yep, you are right, do you wanna send a PR?

deltaidea commented 10 years ago

Maybe you should close this as it was fixed in 07099e90db90095edd97e03d656529bdd4002b07.