closure-templates: Missing soyutils.js in this GitHub Repository

Hi,

I was looking for all examples for the usage of closure library with Javascript and I think a file is missing in this repository.

This file is : soyutils.js It’s required when you don’t have closure library

Please could you have a look and fix this ?

More over, the links in the README.md about latest Javascript compiler point to an out of date version. Please could you update this one.

I have double check the pom.xml but there are no indication to generate the soyutils.js. Could you give us the process ?

Thanks in advance for your help 👍

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 1
  • Comments: 28 (5 by maintainers)

Commits related to this issue

Most upvoted comments

In fact as mentionned in #127 In soyutils.js I cannot find this function : soy.asserts.assertType(...)

Yes, soyutils.js no longer exists.

There used to be 2 JS files that we provided soyutils_usegoog.js and soyutils.js which was soyutils_usegoog.js with just enough closure to work.

We stopped providing that, and we do need to update documentation.

Even if you were to copy soy.asserts into the latest version of soyutils.js you would probably run into a similar missing or outdated API problem.

So we’re not going to provide update the old soyutils.js, but instead I can provide just enough closure so that you can load

  • closure_required_by_soy.js
  • soyutils_usegoog.js
  • soydata_converters.js

and then we can start updating documentation to explain how to

  1. explain how to use the soy JS runtime with closure
  2. explain why it’s a really good idea to use closure compiler with soy-generated JS.
  3. explain how to use it without closure compiler
  4. reiterate 2.

Hi @mikesamuel , @lukesandberg

Any updates would be very appreciated.

Thanks!

Agree with the comment above.

The file soyutils_usegoog.js isn’t a drop-in replacement for soyutils.js and is missing at least var goog = goog || {};, so documentation and examples on how this works would be great.

I’ve found soy_usegoog_lib.js does seem to replace soyutils.js as it has the code that’s missing from soyutils_usegoog.js, however that comes from the test directory and isn’t the documented replacement.

@mikesamuel It would be a pleasure to use closure-template in Javascript in the right way. 👍

So if it will be possible to update the documentation and examples in this Github repo on how to use the soyutils_usegoog.js file and provide those files it would be a huge help for the community 👍

I am waiting for that.

Thank you very much!

@mikesamuel Yes, that would be a huge help. If possible to provide those files eliminating all the closure library dependencies or at least enumerating all the symbols that the JS compiler generates would help the community maintain an optimized version. Thanks a lot!

Hi !

In my team, we’re trying to use this Framework in JavaScript too.

We have the same problem, following the documentation and examples on the github repository.

The file soyutils.js is linked, but this file is missing and we don’t find it…

So, what we also ask is how to use soyutils_usegoog.js version ?

Thanks