Git Product home page Git Product logo

dora-plugin-livereload's People

Contributors

pigcan avatar sorrycc avatar valleykid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dora-plugin-livereload's Issues

增加自定义端口

工作需要,有时候需要同时调试多个站点,希望可以增加自定义端口的功能。

err with request :Error: connect ECONNREFUSED

console信息

  proxy: load rule from proxy.config.js
(node:27570) DeprecationWarning: 'GLOBAL' is deprecated, use 'global'
          proxy: listened on 8989
     livereload: listening on 35729
          proxy: GET / matches /*, forward to http://localhost:8000/output
err with request :Error: connect ECONNREFUSED 127.0.0.1:8000  /

package.json

"start": dora --plugins 'proxy,livereload'

proxy.config.js

'use strict';

var mock = {
   '/*': 'http://localhost:8000/output', // 全部代理到output目录
};

require('fs').readdirSync(require('path').join(__dirname + '/mock'))
  .forEach(function (file) {
    Object.assign(mock, require('./mock/' + file));
  });

module.exports = mock;

devDependencies

 "dora": "^0.4.3",
 "dora-plugin-livereload": "^0.5.2",
 "dora-plugin-proxy": "^0.8.0",

node 6

第一次使用,哪里配置错误?

依赖的 internal-ip 获取本地 ip.得到一个不能访问的地址, 造成 livereload 卡住, 无法打开页面

> os.networkInterfaces()
{ lo0:
   [ { address: '::1',
       netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
       family: 'IPv6',
       mac: '00:00:00:00:00:00',
       scopeid: 0,
       internal: true },
     { address: '127.0.0.1',
       netmask: '255.0.0.0',
       family: 'IPv4',
       mac: '00:00:00:00:00:00',
       internal: true },
     { address: 'fe80::1',
       netmask: 'ffff:ffff:ffff:ffff::',
       family: 'IPv6',
       mac: '00:00:00:00:00:00',
       scopeid: 1,
       internal: true } ],
  en0:
   [ { address: 'fe80::3e15:c2ff:fedf:58ea',
       netmask: 'ffff:ffff:ffff:ffff::',
       family: 'IPv6',
       mac: '3c:15:c2:df:58:ea',
       scopeid: 4,
       internal: false },
     { address: '192.168.199.134',
       netmask: '255.255.255.0',
       family: 'IPv4',
       mac: '3c:15:c2:df:58:ea',
       internal: false } ],
  awdl0:
   [ { address: 'fe80::b85a:4dff:fe78:452',
       netmask: 'ffff:ffff:ffff:ffff::',
       family: 'IPv6',
       mac: 'ba:5a:4d:78:04:52',
       scopeid: 8,
       internal: false } ],
  utun0:
   [ { address: '30.39.56.182',
       netmask: '255.255.255.255',
       family: 'IPv4',
       mac: '00:00:00:00:00:00',
       internal: false } ] }
internalIp.v4() => 30.39.56.182

ws://30.39.56.182:35729/livereload 并不能访问到.

这个能解决下吗 ?

请完善readme

compiler, injectHost, enableJs 这些参数具体怎么用,有什么含义?请完善readme文档

ip 不对

10.x:8001/ html 内产生代码

<script src='http://192.x:35729/livereload.js'></script>

不能用 192 的 ip

新增 entry 参数

由于部分业务中并不会存在实体的 html 文件

之后做成创建 script 节点的方式来满足需求

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.