How to use the tiny-lr.changed function in tiny-lr

To help you get started, we’ve selected a few tiny-lr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Froguard / tinylrs / lib / lrServer.js View on Github external
em.on(evt, function(file) {
                file = path.normalize(file);
                // file = path.relative(cwd,file).replace(/\\/g,"/") || file;
                file = path.relative(RES_ROOT,file).replace(/\\/g,"/") || file || "error/path";
                console.log(getCurT() + " Send-Changed: " + color(file,"cyan"));
                // send msg of changed file info
                // sendMsg(file || "index.html");
                tinyLr.changed(file || "index.html");//It is not 'server.changed({ params: { files: files }})'
            });
        });
github abecms / abecms / src / cli / core / manager / Manager.js View on Github external
monitor.on('created', (f, stat) => {
            if (f.indexOf(`.${config.files.templates.extension}`) < 0) {
              cmsTemplates.assets.copy()
              tinylr.changed(f)
              console.log(
                'Assets have been synchronized after this creation: ' + f
              )
            } else {
              this.getKeysFromSelect()
              this.updateStructureAndTemplates()
              if (typeof this.lserver != 'undefined') {
                tinylr.changed(f)
              }
              this.events.template.emit('update')
            }
          })
          monitor.on('changed', (f, curr, prev) => {
github firebase / superstatic / lib / utils / reloader.js View on Github external
watcher.on('change', function (filepath) {
        
      console.log('[Livereload] %s changed. Updating page.', filepath); 
      tinylr.changed(filepath);
    });
  });
github abecms / abecms / src / cli / core / manager / Manager.js View on Github external
monitor.on('created', f => {
            this.updateReferences(f)
            if (typeof this.lserver != 'undefined') {
              tinylr.changed(f)
            }
            this.events.reference.emit('update')
          })
          monitor.on('changed', f => {
github root-systems / dogstack / examples / dogs / server.js View on Github external
bundlerEmitter.on('update', () => {
      LiveReload.changed(bundleUrl)
    })
    app.use(injectLiveReloadScript())
github peteschaffner / framerjs-cli / bin / framer-preview.js View on Github external
.on('all', function(event, file) {
    livereloadServer.changed(file);
  });
github MiguelCastillo / 3dub / src / index.js View on Github external
.on("unlink", filepath => {
          logger(`File ${filepath} has been deleted`);
          tinylr.changed(filepath);
        });
    }
github kabisa / maji / src / maji-dev-server.js View on Github external
watcher.on('all', function(event, path) {
      tinylr.changed(path)
    });
  });
github Froguard / tinylrs / lib / lrServer.js View on Github external
sendMsgTimer = setTimeout(function(){
            tinyLr.changed(msg);//It is not 'server.changed({ params: { files: files }})'
        }, 0);
    }

tiny-lr

Tiny LiveReload server, background-friendly

MIT
Latest version published 4 years ago

Package Health Score

71 / 100
Full package analysis

Similar packages