diff --git a/README.md b/README.md index 2673e1c..be481d8 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ npm i y-webrtc ```js import * as Y from 'yjs' -import { WebrtcProvider } from '../src/y-webrtc.js' +import { WebrtcProvider } from 'y-webrtc' const ydoc = new Y.Doc() // clients connected to the same room-name share document updates diff --git a/package.json b/package.json index 8671a44..243db7c 100644 --- a/package.json +++ b/package.json @@ -7,14 +7,16 @@ "module": "./src/y-webrtc.js", "sideEffects": false, "scripts": { + "clean": "rm -rf dist", "start": "node ./bin/server.js", "debug": "concurrently 'http-server -o index.html' 'npm run watch'", "demo": "concurrently 'http-server -o demo/index.html' 'npm run watch'", - "dist": "rm -rf dist && rollup -c", + "dist": "rollup -c", + "types": "tsc", "watch": "rollup -wc", "test": "npm run lint", "lint": "standard && tsc", - "preversion": "npm run lint && npm run dist" + "preversion": "npm run clean && npm run lint && npm run dist && npm run types" }, "bin": { "y-webrtc-signaling": "./bin/server.js"