Giter Club home page Giter Club logo

layaair-reload's Introduction

Laya 的自动编译

由于 laya 的 ide 需要按 F6 编译运营,每次都需要从 vscode 切换,开发效率非常低,尝试过使用 webpack,但是有点侵入性,需要改一些代码,不易于后续开发人员维护,这里利用的是 layaair2-cmd 编译,browser-sync 开启本地服务。

Start

layaair2-cmd 需要全局安装

npm i -g layaair2-cmd

在项目中安装 browser-sync 以及 gulp

npm i browser-sync gulp

复制 gulpfile 到项目目录,执行 gulp compile

本地服务地址: http://localhost:3000

注意

  1. 因为原本 laya 的编译就会比较慢一点,多按可能会导致多次刷新。
  2. 涉及到 ide 中的 ui 导出问题,还是需要按 F12 导出,这个 layaair2-cmd 没法处理。

最后

有更好的方案,记得暗示我一下

layaair-reload's People

Contributors

wjj5728 avatar

Watchers

 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.