Skip to content

Commit

Permalink
a few caveats
Browse files Browse the repository at this point in the history
  • Loading branch information
Rundll86 committed Nov 10, 2024
1 parent 66404e3 commit 1f3d89a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
3. 启动webpack开发服务器,`npm run dev`,等待十几秒会自动打开网页 `http://127.0.0.1:25565`,网页初次响应需要大概十秒来等待webpack编译,此后就会自动热更新,无需手动刷新,响应完成后请点击 `加载拓展` 按钮。
4. 修改 `src/extension.ts` 即可定义新积木,可在WaterBox中调试积木,或点击复制链接后将其加载到TurboWarp/GandiIDE中。
5. 检查所有积木功能无误后编译到生产环境,`npm run dist`
6. 编译结果输出于 `dist` 文件夹中的 `extension.dist.js`
6. 编译结果输出于 `dist` 文件夹中的 `extension.dist.js`
7. 对于 `src/fs-context` 中的文件/夹均为框架代码,勿动。
2 changes: 2 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default class MyExtension extends Extension {
//使用load方法加载当前语言的l10n
translator.load("tanchuang"),
{
//积木参数的name字段必须用$或_开头,否则ts将会编译不通过且方法中也不会有字段类型提示
name: "$content",
inputType: "string",
value: "something"
Expand All @@ -39,6 +40,7 @@ export default class MyExtension extends Extension {
{
name: "$suffix",
inputType: "menu",
//inputType为menu时,value字段必须为一个已定义的Menu的名称
value: "suffix"
}
).config({
Expand Down

0 comments on commit 1f3d89a

Please sign in to comment.