From 7d44fbb6ba2d7050286b32c8fc473b4c82c8a60c Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 14 Apr 2020 19:42:33 +0200 Subject: [PATCH] keep and publish declaration files --- README.md | 2 +- package.json | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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"