@valtrem/sync
TypeScript icon, indicating that this package has built-in type declarations

1.6.2 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @valtrem/sync

Weekly Downloads

28

Version

1.6.2

License

ISC

Unpacked Size

147 kB

Total Files

152

Last publish

Collaborators

  • valtrem