Giter Club home page Giter Club logo

localsync's Introduction

A CLI to automate the noderaider packages for development.

install options

  • npm install --global noderaider
  • yarn global add noderaider

cli

bootstrap

# update and reinstall latest dependencies
noderaider update

# start noderaider repos in development mode (watch / HMR)
noderaider start

# build noderaider repos for production
noderaider build

# test all the packages
noderaider test

# publish a new version of everything
noderaider release [--next]

All commands automatically clone, install dependencies, and link packages if its the first run!

localsync's People

Contributors

cchamberlain avatar tomchentw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

localsync's Issues

Cookiesync not supported with Internet Explorer 11

Hi,

First thank you for the lib ๐ŸŽˆ!

I've found that cookiesync breaks IE11 and throws Syntax Error.

It breaks at this line exports.cookiesync = (context) => {.

I've tried to polyfill the lib myself but I'm having trouble.

https://i.ibb.co/qRTbMvc/syntaxerror.png

https://i.ibb.co/F80wFmd/cookiesync.png

Thank you! It would be very handful to make it work with IE11 as some of our user are still using the browser :/

Not working with React

I want to use localsync in React to log user out of all tabs when they log out of one tab.

When the trigger is called, the action executes in one tab, but the handler is not called in another. Tested in Chrome. I have something like the following:

export class App extends Component {
  componentDidMount(){
    this.globalLogout = localsync('logout', this.syncAction, this.localLogout, {tracing: true});
  }

  syncAction = () => {/*do nothing*/ return;}

  localLogout = () => {console.log("user has been logged out of this tab");}

  logoutUser = () => {
    this.localLogout();
    this.globalLogout.trigger();
  }
}

In the console, I got storagesync#start on for each Chrome tab that I opened. I then got storagesync#trigger > [] on calling logoutUser in one tab, but nothing happens in the other tabs. I expected to get the message "user has been logged out of this tab" on every tab.

trigger function in typescript

I got typescript error when trying execute trigger function with params that it's expecting no params, according Controller.ts trigger has type () => void;
Any solution?

Add lifetime for the cookiesync

If it is possible, could you add a lifetime for the cookiesync.
F.e
let localsync= localsync('localsync', action, handler, {cookieLifeTime : 10000, pollFrequency: 100 }

Thanks!

Is there any way for leader election?

Hi,

I'd like to know if you have any plans to implement leader/master election?

It would be useful for cases to prevent multiple tabs from polling the server (just the master would poll the server and sync to the other tabs)

Cheers

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.