goog.provide('Music.Blocks');

26 views
Skip to first unread message

AlgoRhythm

unread,
Jun 8, 2024, 5:57:08 AMJun 8
to Blockly
hi i tried to code an app similar to blockly games (music game).

in the blocks.js file in the blocky-games github repo, there is goog.provide('Music.Blocks');.

but when i used it, there is a ReferenceError: goog is not defined.

is goog.provide('Music.Blocks') no longer used? what is the alternative?

Aaron Dodson

unread,
Jun 10, 2024, 11:14:20 AMJun 10
to Blockly
You may need to install the dependencies. That said, goog.provide/require come from Google's Closure library, which is deprecated and going away in a couple months; if you're starting a new project, you'd likely be better served by using modern JS development practices. The create-package tool can set you up with a new Blockly app using current practices, and code samples from the documentation should work more easily as well.

- Aaron

Reply all
Reply to author
Forward
0 new messages