alexstrat / node-tagify

Browserify middleware for embedded compilation options
3 stars 1 forks source link

Doesn't work with CoffeeScript #1

Open ELLIOTTCABLE opened 11 years ago

ELLIOTTCABLE commented 11 years ago

I want to ignore the 'vm' require in the following section of code:

require('vm').createScript(source).runInNewContext(context)

However, because I'm writing in CoffeeScript, neither of the following works:

#@browserify-ignore
require('vm').createScript(source).runInNewContext(context)

… nor …

###
//@browserify-ignore
###
require('vm').createScript(source).runInNewContext(context)

Am I doing something wrong, or does this library not operate with CoffeeScript products?

cbosco commented 11 years ago

@elliottcable have you tried dropping into plain JavaScript? That's what works for me:

`//@browserify-ignore -c`

Slightly ugly but gets the job done

ELLIOTTCABLE commented 11 years ago

@cbosco that works, indeed. I wish it would support it natively, but that's better than nothing. Thanks! <3

(I'll leave the issue open, since a better solution is desired.)

alexstrat commented 11 years ago

@elliottcable yes this module was not made with CS in mind. I don't know how browserify treats CS files but it might have a mean to do things: feel free to try and propose a pull request :)

However, i've seen that browserify 2 has been released. So