Search code examples
livescript

Livescript. require! and execute


How do I do something that transpiles into this:

var foo = require('foo')() 

Doing that doesn't work:

require! { 
  \foo !
}

of course I can run it right after the require!, but I was hoping for a shorter form


Solution

  • You can't with require!, I would just use the original require

    foo = require('foo')!