1.3.2 • Published 3 years ago

@harlem/plugin-snapshot v1.3.2

Weekly downloads
26
License
MIT
Repository
github
Last release
3 years ago

Harlem Snapshot Plugin

npm

This is the official Harlem plugin for taking state snapshots and applying them when convenient.

Getting started

Before installing the snapshot plugin make sure you have installed @harlem/core.

  1. Install @harlem/plugin-snapshot:
npm install @harlem/plugin-snapshot

Or if you're using Yarn:

yarn add @harlem/plugin-snapshot
  1. Create an instance of the plugin and register it with Harlem:
import App from './app.vue';

import harlem from '@harlem/core';
import createSnapshotPlugin from '@harlem/plugin-snapshot';

createApp(App)
    .use(harlem, {
        plugins: [
            createSnapshotPlugin()
        ]
    })
    .mount('#app');
  1. Call the snapshot method with the name of the store you wish to snapshot:
import {
    snapshot
} from '@harlem/plugin-snapshot';

export default function() {
    const snap = snapshot('my-store');

    // ...
}
  1. Apply the snapshot:
const snap = snapshot('my-store');

snap.apply(); // Apply the snapshot over the top of current state
snap.apply(true) // Replace state with the current snapshot
1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.0

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.1.3

3 years ago

1.2.1

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago