Coder Social home page Coder Social logo

paas-devtool-design's Introduction

devtool

使用 engine-mobile(或webapp) 目录启动paas开发环境, 切换 config 配置, 不重启 webpackDevMiddleware

👌

  • --pre yes 启用 engine-mobile 目录下 eslint

使用方式

yarn link engine-mobile // [必要], 

// engine-mobile目录下要执行 yarn link paas-component-basic, 才能使用系统组件

yarn start  // 启动运行时

yarn design  // 启用设计时

更改 config/index.json 中 proxyTarget 参数配置,自动重启express

实现方式

virtualization 目录

  • 适配代码中 __dirname 逻辑

    • 使用memory-fs, 将 fs-patch 目录文件按目录结构写入内存文件系统, 用于在 engine-mobile/build 中运行.
    • 使用 fs-monkey patchRequire, 使fs-patch中文件可通过require引入
  • 适配 process.cwd()

    • process.chdir
  • 自动更新

    • main.js, watcher.js 用于监听config中proxyTarget内容.
    • 通过 delete require.cache[target] 方法重载配置内容

paas-devtool-design's People

Contributors

songlairui avatar

Watchers

James Cloos avatar  avatar  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.