cincheo / jsweet-eclipse-plugin

The official Eclipse plugin for the JSweet transpiler
http://www.jsweet.org
Apache License 2.0
20 stars 10 forks source link

Using without Maven #11

Closed WhiteTrashLord closed 8 years ago

WhiteTrashLord commented 8 years ago

I want to test Jsweet. Unfortunately I have some problems. I don't use Maven and prefer to include the jars myself. I copied the files from the quickstart example and added 3 jars: jsweet-transpiler, jsweet-core-strict and jsweet-core. Should this work in theory? When I clean the project nothing happens. But currently my Eclipse uses a JRE which might be only problem. It would be good if you add a tutorial how to start without Maven.

renaudpawlak commented 8 years ago

I guess that you have already checked out this one: http://www.jsweet.org/eclipse-plugin/

I don't think that it is a good idea to not use Maven at all. However, yes, you can indeed use the Eclipse plugin only and add the Jars manually. The only Jar you need to get started is jsweet-core-1.0.0-20160122.jar (look it up there: http://repository.jsweet.org/artifactory/webapp/#/artifacts/browse/tree/General/cincheo). Do not use the strict jar, and you don't need the jsweet-transpiler jar because it is already included in the Eclipse plugin.

The jsweet-core Jar contains the core JavaScript and DOM APIs. That's enough to get started with most of JavaScript. If you want more APIs, you will need more Jars, but use only the released ones if you use the plugin.

It is totally fine in theory if your Eclipse uses a JRE. You need a recent version of Eclipse (Mars or Luna). Also, you need your JAVA_HOME environment variable to point to a JDK 1.8.

Please note that the Eclipse plugin is still beta and you will only have access to JSweet 1.0.0. We will update it as soon as we release JSweet 1.1.0. If you have trouble, check out the errors log view of Eclipse.

ghost commented 6 years ago

Hi Renaud, Is there a possibilty to use jsweet transpiler from commandline like javac? This would make it build tool independent - one could use it with gradle or ant or any other tool he likes.

lgrignon commented 6 years ago

Hi. Yes of course, please see https://github.com/cincheo/jsweet/blob/master/transpiler/src/main/java/org/jsweet/JSweetCommandLineLauncher.java