scalate icon indicating copy to clipboard operation
scalate copied to clipboard

Port to Scala-JS

Open nightscape opened this issue 4 years ago • 1 comments

I'm trying to port some parts to Scala-JS in the hope that it will result in a version that might be reduced in terms of functionality, but usable in the browser. My rough plan is to proceed like this:

  1. Port parsers
  2. Abstract over usages of the compiler
  3. Implement an evaluation engine that evaluates templates instead of compiling them

I've ported handlebars.scala to Scala-JS, so I have a rough overview of what is required and how the evaluation engine should look like.

Unfortunately, this requires a rather large restructuring of the code base to separate JS-compatible stuff from only-JVM. I hope this is ok @magnolia-k @xuwei-k? If not, please let me know as soon as possible, so I don't waste time here with something that has little chances of getting merged...

nightscape avatar Jan 12 '21 09:01 nightscape

@nightscape

Very interesting project! However, however, the PR is just too huge to review.

The formatting changes and the logger changes were incorporated at the same time, so I can't judge the validity of this PR.

If there are more fine-grained commits, I think it would be better to break it down and publish the PR, or even better, fork it and let it grow.

Scalate relies heavily on the Scala compiler, which makes it difficult to make major improvements, so this is definitely a very interesting PR.

Translated with www.DeepL.com/Translator (free version)

magnolia-k avatar Jan 13 '21 14:01 magnolia-k