v20230206 is the last version, for which the getting started tutorial works

29 views
Skip to first unread message

Gregor Urbanek

unread,
Jun 23, 2023, 1:31:25 PM6/23/23
to Closure Library Discuss
Hello fellow closure library newbies and experts!

I'm new to closure library (coming from the clojurescript camp).

While trying to go through the getting started tutorial ( https://developers.google.com/closure/library/docs/gettingstarted ) and using the newest lib. version (v20230502), I failed. In order to spare newcomers a frustrating 1st ride here are my steps to succeed:
  $ mkdir -p ~/Projects/learn-closure && cd ~/Projects/learn-closure
  $ tar -xzf v20230206.tar.gz && rm v20230206.tar.gz && mv closure-library-20230206 closure-library
  $ cd closure-library && npm install
  . now create the hello.html & hellp.js file, as described in the tutorial (in ~/Projects/learn-closure directory)!
  $ cd .. && npx http-server -o hello.html

Have a good ride!

Cheers Greg










Stephen Hicks

unread,
Jun 23, 2023, 4:20:04 PM6/23/23
to Closure Library Discuss
Thanks for sharing your experience and tips.

Was this in an effort to get Closure Library working with ClojureScript, or separately with hand-written JavaScript?  If the latter, I'd recommend looking elsewhere.  The entire Closure Tools suite is pretty dated at this point, and much of its raison d'être no longer exists: its custom module system is no longer needed (first with CJS, and now with ESM being the gold standard), the compatibility shims it provides are no longer relevant (since browser compatibility/interop has come a long way in 15+ years), and the type system is clunky compared to newer alternatives like TypeScript.  Moreover, because the rest of the world has evolved in a different direction, using Closure actually new presents a compatibility burden, since it doesn't interop well with the modern standards.  There are still a lot of "Good Parts" between both the library and the compiler, but our overall attitude has shifted in recent years to seeing it as more of a backend to more ergonomic languages, rather than being particularly suitable for hand-written JavaScript.
Reply all
Reply to author
Forward
0 new messages