@valtrem/sync

```shell npm install @valtrem/sync ```

Usage no npm install needed!

<script type="module">
  import valtremSync from 'https://cdn.skypack.dev/@valtrem/sync';
</script>

README

@valtrem/sync

Installation

npm install @valtrem/sync

Usage

In vuex store.ts register modules as you would for any other modules. Then, pass store and configuration options to sync package.

For exemple :

#store.ts
import { Clients } from '@/store/modules/Client';
import { Projects } from '@/store/modules/Project';
import { Authentication } from '@valtrem/sync/src/store/Authentication';
import { Connectivity } from '@valtrem/sync/src/store/Connectivity';
Vue.use(Vuex);
const store = new Vuex.Store({
  modules: {
    authentication: new Authentication(),
    connectivity: new Connectivity(),
    projects: new Projects(),
    clients: new Clients(),
    }
});

const config = {
  apiUrl: process.env.VUE_APP_API_URL,
  storeNames: ['projects', 'clients']
};

sync(store, config);

export default store;

Credits

valerie@cliento.ca