Closed vorth closed 3 years ago
Furthermore, I dug out the Jackson JAR that Maven downloaded... I don't think this is a candy at all. There is no TypeScript code, nothing but the usual .class files.
I think I see what is happening... when I searched Artifactory, my search somehow fell through into external, non-jsweet repositories. There are no candies for Jackson.
Even so, I'd still like to see a Java candy example.
As you found out, com.fasterxml.jackson.core
group is a regular Java lib. It cannot be a candy.
Everything is explained here: http://www.jsweet.org/jsweet-candies/
Basically, you have 2 kinds of candies:
org.jsweet.candies
grouporg.jsweet.candies.j4ts
groupCandies of the second kind require extra development... it is not alway possible to create a candy that will support a Java library. You will find the Java candies state-of-the-art in the https://github.com/j4ts organization.
As for an example, a Java candy is used exactly like a regular JavaScript candy... if it does not work, it means that there is a bug somewhere :)
Thanks @vorth and @renaudpawlak for the answer.
@vorth do you now have everything you need? Please close this issue if it's a yes :)
This is now up to date with latest JSweet https://github.com/lgrignon/jsweet-candy-example :)
Thank you, @lgrignon. That helps.
I still have a number of questions, and I don't want to raise defects. I would really appreciate it if you or @renaudpawlak could email me. I have been very successful so far (see https://vzome.com/app), but I want to go to the next level and package my code as a React component on NPM. I cannot ask people to add script tags to their index.html as I have. My email address is on my profile.
I'm loving JSweet so far, for the most part, but...
I cannot see how to pull in the Java candies from your Artifactory to my project. Initially, I would see errors like this:
I added the pom.xml dependencies, e.g.
...using versions I found in your Artifactory.
Now, I get through the Java transpiler, but I'm failing (apparently) in the Typescript transpiler, with hundreds of errors like this:
Furthermore, there is no evidence, either in .jsweet/candies or in webapp/candies, that the Jackson candies have actually been downloaded. What am I missing? (Yes, I have added repositories for jsweet-central and jsweet-snapshots... pom.xml attached.)
Perhaps I'm picking up artifacts from Maven Central, implicitly?
In any case, it would be really helpful if you provided an example that pulls Java candies from Artifactory.
pom.xml.zip