当前位置: 首页 > 工具软件 > Closure Tools > 使用案例 >

安装Google Blockly Developer Tools离线版

穆高澹
2023-12-01

1. Blockly Developer Tools Demo在线版:

https://blockly-demo.appspot.com/static/demos/toolbox/index.html

注意:国内可能被墙导致该网址访问不了,可按如下步骤安装Blockly Developer Tools离线版。

 

2. Blockly Developer Tools 的Github仓库地址:

https://github.com/google/blockly-devtools

下载zip打包文件,并解压至电脑任一目录。

 

3. Blockly Developer Tools安装过程:

3.1 Install node and NW.js

In order to properly run and test Blockly's devtools, install node.js and NW.js on your computer. Instructions for installation can be found on the linked sites.

node.js下载地址,下载长期支持的稳定版,安装即可:

https://nodejs.org/zh-cn/

NW.js下载地址,下载normal版本,解压至电脑目录,并将该解压的目录路径添加至电脑的path:

https://nwjs.org.cn/download.html

3.2 Install Devtools

In your devtools directory run

npm install

3.3 Run Devtools

Find the relative path to nwjs/nw that you installed onto your computer. Run the following command from the devtools repo's directory.

nwjs/nw .

Doing so will run devtools as an NW.js application on your computer.

3.4 Closure dependency error

If you get an error about "closure" upon loading the app, it probably means the blockly-devtools/closure-library/directory has not been set up. Try running:

git submodule update --init --recursive

Alternatively, install the closure-library into that directory. If you are working with the web library, you may prefer to share a local copy via a symlink (i.e., ln -s path/to/closure-library).

We are currently working on removing this dependency, but this will fix the issue until then.

 

Closure Library的下载地址:

https://developers.google.cn/blockly/guides/modify/web/closure

下载zip打包文件,解压至Blockly Developer Tools目录,并重命名目录为“closure-library”。

重新运行命令:

nw .

成功运行!

 

 

 类似资料: