0.1.12 • Published 5 years ago

@wirelineio/automerge-worker v0.1.12

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

automerge-worker

Usage

const { createAutomergeWorker } = require('@wirelineio/automerge-worker');

// Create an instance of worker.
const worker = createAutomergeWorker();

// Use worker API.
const { changes } = await createDocument(feedKey, itemId);
const content = await getDocumentContent(itemId);

Usage with Webpack

Web

  • Use the webpack plugin CopyWebpackPlugin to copy the automerge.worker.js from dist/umd:
{
  plugins: [
    new CopyWebpackPlugin: ['../../node_modules/@wirelineio/automerge-worker/dist/umd/automerge.worker.js']
  ]
}

Node

  • Use the webpack plugin CopyWebpackPlugin to copy the automerge.worker.js from dist/cjs:
{
  plugins: [
    new CopyWebpackPlugin: ['../../node_modules/@wirelineio/automerge-worker/dist/cjs/automerge.worker.js']
  ]
}

Config AUTOMERGE_WORKER_PATH

The env variable AUTOMERGE_WORKER_PATH can be set to specify the path to the worker file copied in the previous step.

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.7-alpha.0

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago