Skip to content

Conversation

@ufukbay
Copy link

@ufukbay ufukbay commented Jul 3, 2015

It would be nice to be able to set the path to the SoyToJsSrcCompiler.jar in the options, so we can make sure we use the same file both in the backend and frontend rendering of Soy files. This also allows us to have control over the version of the SoyToJsSrcCompiler.jar file.

@nicks
Copy link
Contributor

nicks commented Jul 3, 2015

this won't do what you expect, because an arbitrary jar will not be compatible with the soy support JS. you will also need to add a way to customize the soy support JS.

@ufukbay
Copy link
Author

ufukbay commented Jul 6, 2015

With Soy support JS, do you mean the "soyutils.js"?

@nicks
Copy link
Contributor

nicks commented Jul 6, 2015

yes. in more recent versions of closure-templates, you need soyutils_usegoog.js and a whole set of closure-library files. see:
https://github.com/Medium/soynode/blob/master/lib/SoyVmContext.js#L15

@ufukbay
Copy link
Author

ufukbay commented Jul 6, 2015

We painfully figured out that Google doesn't maintain the soyutils.js anymore, which you can download on the official Soy website (https://developers.google.com/closure/templates/docs/helloworld_js). Therefore we generate our own version of this library supporting only the features, which we are using in our templates. This helps immensely to reduce the file size.
The difference between the soyutils.js and soyutils_usegoog.js, which you can download on the official website mentioned above is, that soyutils_usegoog.js has smaller file size in case you are also using the Google Closure Library. On the other hand soyutils.js is the standalone version to use without Google Closure Library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants