سؤال

We use JavaScript a kind of DSL in our project and running it using Java Scripting API. CoffeScript looks much better that JS so we want to it. T

Since there is no implementation of CoffeScript for Java Scripting, we can still us the JS implementation if we manage to compile CoffeScript to JS. The question is how to do it in a easy way? What have to be done?

CoffeScript compiler seems to require node.js, but it is not an option for us to deliver it in our installer.

هل كانت مفيدة؟

المحلول

The stdandard CoffeeScript-Compiler is implemented in CoffeeSCript. So it needs to run under some JavaScript environment.

But there is a JCOffeeSCript-Implementation: Java library that converts coffeescript to javascript or compiled java executable?

That could do what you want.

But I would recommend to compile the CoffeeScript to JavaScript in your build- packaging-process before delivering it, if this is an option for you. That would lead to an easier installation process for your customers and you don't have to ship any compiler and build-scripts.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top