Giter Site home page Giter Site logo

egret-helper's Introduction

egret 工具

建议和bug反馈

特性

  • 支持在编辑器中开启Egret服务器
  • 支持在编辑器中重新编译
  • 支持Egret调试
  • 支持ts代码中的 非空字符.skinName 路径快速跳转和补全
  • 支持将 扩展设置 egret-helper.egretResourcePath 目录的资源文件同步到 egret-helper.egretResourceJsonPath json中
  • 如果安装了 Egret UI Editor 按下快捷键(默认 Alt+F1 )会自动打开当前ts绑定的exml(Mac平台需要手动安装shell命令,打开Egret UI Editor 菜单栏:文件->安装 shell 命令)
  • 支持在编辑器调用 Egret Launcher 的发布和创建页面

如何使用

  • 安装 Chrome 浏览器
  • 更多功能 点击 vscode左下角的状态栏插件图标 ,选择对应操作即可即可

扩展设置

属性名 类型 枚举值 默认 说明
enable boolean true,false true 是否启用插件
devlog boolean true,false false 是否打印详细日志
egretResourceJsonPath string - resource/default.res.json Egret资源配置的路径(相对于项目根目录)
egretResourcePath string - resource Egret资源的路径(相对于项目根目录)
alertErrorWin boolean true,false false 是否在碰到错误时弹出错误提示框
openEgretServer enum auto,alert auto 打开项目时怎么开启Egret服务器 (注¹)
resMap object array - vscode设置中查看 同步Egret资源映射 (注²)
resMapIgnore string array - vscode设置中查看 同步Egret忽略资源 (注³)
hostType enum 127.0.0.1,ip 127.0.0.1 Egret服务器http地址的格式 (注⁴)
debugBrowser enum chrome,edge chrome 调试使用的浏览器
port number - 7000 Egret服务器首选端口 (注⁵)

注释

注¹

auto:打开Egret项目时,自动开启Egret服务器
alert:打开Egret项目时,弹框询问是否开启Egret服务器

注²

例如{".png":{tail:"_png",type:"image"}}
.png:代表文件扩展名(必须小写)
_png:扩展名尾巴(Egret资源的名字xxx_xx_png)
imagedefault.res.json 中资源的type属性定义

注³

可以是文件名 xx.png(不区分大小写)
路径的末尾 tmp/xx.png(不区分大小写)
某一类文件 .png(不区分大小写)

注⁴

ip:Egret服务器使用 ip:端口号 例如(http://192.168.1.1:8000/index.html) 注意使用这种方式 .vscode/launch.json 里的ip容易频繁变动
127.0.0.1:强制Egret服务器使用 127.0.0.1:端口号 例如(http://127.0.0.1:8000/index.html)

注⁵

Egret服务器使用端口 如果被占用默认寻找可用端口

扩展命令

  • egret-helper.goToExml: 使用Egret UI Editor打开 快捷键默认 Alt + F1
  • egret-helper.egretBuildAndDebug: 重新编译项目并调试 快捷键默认 Ctrl + F5

egret-helper's People

Contributors

zt5 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.