react-peer-chat 0.1.12 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/icons.css +11 -0
- package/build/icons.d.ts +4 -0
- package/build/icons.js +18 -2
- package/build/index.css +88 -0
- package/build/index.d.ts +29 -6
- package/build/index.js +126 -26
- package/build/{useStorage.d.ts → storage.d.ts} +1 -0
- package/build/{useStorage.js → storage.js} +1 -1
- package/package.json +4 -3
package/build/icons.css
ADDED
package/build/icons.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import './icons.css';
|
|
3
|
+
export declare function BiSolidMessageDetail(props: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>): React.JSX.Element;
|
|
4
|
+
export declare function BiSolidMessageX(props: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>): React.JSX.Element;
|
|
5
|
+
export declare function GrSend(props: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>): React.JSX.Element;
|
|
2
6
|
export declare function BsFillMicFill(props: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>): React.JSX.Element;
|
|
3
7
|
export declare function BsFillMicMuteFill(props: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>): React.JSX.Element;
|
package/build/icons.js
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import './icons.css';
|
|
3
|
+
export function BiSolidMessageDetail(props) {
|
|
4
|
+
return React.createElement("span", Object.assign({}, props),
|
|
5
|
+
React.createElement("svg", { fill: "currentColor", width: '1.5rem', height: '1.5rem', className: 'scale-down' },
|
|
6
|
+
React.createElement("path", { d: "M20 2H4c-1.103 0-2 .894-2 1.992v12.016C2 17.106 2.897 18 4 18h3v4l6.351-4H20c1.103 0 2-.894 2-1.992V3.992A1.998 1.998 0 0 0 20 2zm-6 11H7v-2h7v2zm3-4H7V7h10v2z" })));
|
|
7
|
+
}
|
|
8
|
+
export function BiSolidMessageX(props) {
|
|
9
|
+
return React.createElement("span", Object.assign({}, props),
|
|
10
|
+
React.createElement("svg", { fill: "currentColor", width: '1.5rem', height: '1.5rem', className: 'scale-down' },
|
|
11
|
+
React.createElement("path", { d: "M20 2H4c-1.103 0-2 .894-2 1.992v12.016C2 17.106 2.897 18 4 18h3v4l6.351-4H20c1.103 0 2-.894 2-1.992V3.992A1.998 1.998 0 0 0 20 2zm-3.293 11.293-1.414 1.414L12 11.414l-3.293 3.293-1.414-1.414L10.586 10 7.293 6.707l1.414-1.414L12 8.586l3.293-3.293 1.414 1.414L13.414 10l3.293 3.293z" })));
|
|
12
|
+
}
|
|
13
|
+
export function GrSend(props) {
|
|
14
|
+
return React.createElement("span", Object.assign({}, props),
|
|
15
|
+
React.createElement("svg", { fill: "currentColor", width: '1.5rem', height: '1.5rem', className: 'scale-down invert' },
|
|
16
|
+
React.createElement("path", { fill: "none", stroke: "#000", strokeWidth: 2, d: "M22,3 L2,11 L20.5,19 L22,3 Z M10,20.5 L13,16 M15.5,9.5 L9,14 L9.85884537,20.0119176 C9.93680292,20.5576204 10.0751625,20.5490248 10.1651297,20.009222 L11,15 L15.5,9.5 Z" })));
|
|
17
|
+
}
|
|
2
18
|
export function BsFillMicFill(props) {
|
|
3
19
|
return React.createElement("span", Object.assign({}, props),
|
|
4
|
-
React.createElement("svg", { fill: "currentColor", width: '
|
|
20
|
+
React.createElement("svg", { fill: "currentColor", width: '1rem', height: '1rem' },
|
|
5
21
|
React.createElement("path", { d: "M5 3a3 3 0 0 1 6 0v5a3 3 0 0 1-6 0V3z" }),
|
|
6
22
|
React.createElement("path", { d: "M3.5 6.5A.5.5 0 0 1 4 7v1a4 4 0 0 0 8 0V7a.5.5 0 0 1 1 0v1a5 5 0 0 1-4.5 4.975V15h3a.5.5 0 0 1 0 1h-7a.5.5 0 0 1 0-1h3v-2.025A5 5 0 0 1 3 8V7a.5.5 0 0 1 .5-.5z" })));
|
|
7
23
|
}
|
|
8
24
|
export function BsFillMicMuteFill(props) {
|
|
9
25
|
return React.createElement("span", Object.assign({}, props),
|
|
10
|
-
React.createElement("svg", { fill: "currentColor", width: '
|
|
26
|
+
React.createElement("svg", { fill: "currentColor", width: '1rem', height: '1rem' },
|
|
11
27
|
React.createElement("path", { d: "M13 8c0 .564-.094 1.107-.266 1.613l-.814-.814A4.02 4.02 0 0 0 12 8V7a.5.5 0 0 1 1 0v1zm-5 4c.818 0 1.578-.245 2.212-.667l.718.719a4.973 4.973 0 0 1-2.43.923V15h3a.5.5 0 0 1 0 1h-7a.5.5 0 0 1 0-1h3v-2.025A5 5 0 0 1 3 8V7a.5.5 0 0 1 1 0v1a4 4 0 0 0 4 4zm3-9v4.879L5.158 2.037A3.001 3.001 0 0 1 11 3z" }),
|
|
12
28
|
React.createElement("path", { d: "M9.486 10.607 5 6.12V8a3 3 0 0 0 4.486 2.607zm-7.84-9.253 12 12 .708-.708-12-12-.708.708z" })));
|
|
13
29
|
}
|
package/build/index.css
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.main {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
column-gap: 0.5rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.notification {
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.notification .badge {
|
|
12
|
+
background-color: red;
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0.25rem;
|
|
15
|
+
right: 0.25rem;
|
|
16
|
+
width: 0.25rem;
|
|
17
|
+
height: 0.25rem;
|
|
18
|
+
border-radius: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.dialog {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
row-gap: 0.25rem;
|
|
25
|
+
background-color: black;
|
|
26
|
+
color: white;
|
|
27
|
+
padding-top: 0.25rem;
|
|
28
|
+
outline: 2px solid white;
|
|
29
|
+
border-radius: 0.25rem;
|
|
30
|
+
font-size: smaller;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.position-left {
|
|
34
|
+
left: 0.5rem;
|
|
35
|
+
translate: -100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.position-center {
|
|
39
|
+
translate: -50%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.position-right {
|
|
43
|
+
left: 0.5rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.message-container {
|
|
47
|
+
height: 6rem;
|
|
48
|
+
overflow-y: scroll;
|
|
49
|
+
padding-inline: 0.5rem;
|
|
50
|
+
margin-bottom: 0.25rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.message-container::-webkit-scrollbar {
|
|
54
|
+
width: 2.5px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.message-container::-webkit-scrollbar-track {
|
|
58
|
+
background: gray;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.message-container::-webkit-scrollbar-thumb {
|
|
62
|
+
background-color: white;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.heading {
|
|
66
|
+
text-align: center;
|
|
67
|
+
font-weight: bold;
|
|
68
|
+
padding-inline: 0.5rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.input-container {
|
|
72
|
+
display: flex;
|
|
73
|
+
column-gap: 0.25rem;
|
|
74
|
+
padding-inline: 0.5rem;
|
|
75
|
+
padding-block: 0.4rem;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.input {
|
|
79
|
+
background-color: black;
|
|
80
|
+
border: none;
|
|
81
|
+
outline: 1px solid rgba(255, 255, 255, 0.8);
|
|
82
|
+
border-radius: 0.25rem;
|
|
83
|
+
padding-inline: 0.25rem;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.input:focus {
|
|
87
|
+
outline: 2px solid white;
|
|
88
|
+
}
|
package/build/index.d.ts
CHANGED
|
@@ -1,11 +1,34 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { CSSProperties, DetailedHTMLProps, HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
2
2
|
import { PeerOptions } from 'peerjs';
|
|
3
|
-
|
|
3
|
+
import './index.css';
|
|
4
|
+
type Message = {
|
|
5
|
+
id: string;
|
|
6
|
+
text: string;
|
|
7
|
+
};
|
|
8
|
+
type ChildrenOptions = {
|
|
9
|
+
notification?: boolean;
|
|
10
|
+
messages?: Message[];
|
|
11
|
+
addMessage?: (message: Message) => void;
|
|
12
|
+
dialogRef?: RefObject<HTMLDialogElement>;
|
|
13
|
+
audio?: boolean;
|
|
14
|
+
setAudio?: (audio: boolean) => void;
|
|
15
|
+
};
|
|
16
|
+
type DialogPosition = 'left' | 'center' | 'up';
|
|
17
|
+
type DialogOptions = {
|
|
18
|
+
position: DialogPosition;
|
|
19
|
+
style: CSSProperties;
|
|
20
|
+
};
|
|
4
21
|
type Props = {
|
|
5
|
-
|
|
6
|
-
|
|
22
|
+
name?: string;
|
|
23
|
+
peerId: string;
|
|
24
|
+
remotePeerId: string;
|
|
25
|
+
text?: boolean;
|
|
26
|
+
voice?: boolean;
|
|
7
27
|
peerOptions?: PeerOptions;
|
|
28
|
+
dialogOptions?: DialogOptions;
|
|
8
29
|
onError?: () => void;
|
|
9
|
-
|
|
10
|
-
|
|
30
|
+
children?: ReactNode | ((childrenOptions: ChildrenOptions) => ReactNode);
|
|
31
|
+
} & DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
32
|
+
export default function Chat({ name, peerId, remotePeerId, peerOptions, text, voice, dialogOptions, onError, children, ...props }: Props): React.JSX.Element;
|
|
33
|
+
export declare const clearChat: () => void;
|
|
11
34
|
export {};
|
package/build/index.js
CHANGED
|
@@ -7,17 +7,66 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
+
var t = {};
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
+
t[p] = s[p];
|
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
+
t[p[i]] = s[p[i]];
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
10
21
|
import React, { useEffect, useRef, useState } from 'react';
|
|
11
|
-
import useStorage from './
|
|
12
|
-
import { BsFillMicFill, BsFillMicMuteFill } from './icons';
|
|
13
|
-
|
|
22
|
+
import useStorage, { removeStorage } from './storage';
|
|
23
|
+
import { BiSolidMessageDetail, BiSolidMessageX, BsFillMicFill, BsFillMicMuteFill, GrSend } from './icons';
|
|
24
|
+
import './index.css';
|
|
25
|
+
export default function Chat(_a) {
|
|
26
|
+
var { name, peerId, remotePeerId, peerOptions, text = true, voice = true, dialogOptions, onError = () => console.error("Can not access microphone!"), children } = _a, props = __rest(_a, ["name", "peerId", "remotePeerId", "peerOptions", "text", "voice", "dialogOptions", "onError", "children"]);
|
|
14
27
|
const [peer, setPeer] = useState();
|
|
28
|
+
const [opponentName, setOpponentName] = useState();
|
|
29
|
+
const [notification, setNotification] = useState(false);
|
|
30
|
+
const [messages, setMessages] = useStorage('rpc-messages', [], { save: true });
|
|
31
|
+
const connRef = useRef();
|
|
32
|
+
const [dialog, setDialog] = useState(false);
|
|
33
|
+
const dialogRef = useRef(null);
|
|
34
|
+
const containerRef = useRef(null);
|
|
35
|
+
const inputRef = useRef(null);
|
|
15
36
|
const [audio, setAudio] = useStorage('rpc-audio', false, { local: true, save: true });
|
|
16
37
|
const streamRef = useRef(null);
|
|
17
38
|
const localStream = useRef();
|
|
39
|
+
remotePeerId = `rpc-${remotePeerId}`;
|
|
18
40
|
const handleRemoteStream = (remoteStream) => streamRef.current.srcObject = remoteStream;
|
|
41
|
+
function addMessage(message, send = false) {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
setMessages(old => old.concat(message));
|
|
44
|
+
if (send)
|
|
45
|
+
(_a = connRef.current) === null || _a === void 0 ? void 0 : _a.send({ type: 'message', message });
|
|
46
|
+
else if (!((_b = dialogRef.current) === null || _b === void 0 ? void 0 : _b.open))
|
|
47
|
+
setNotification(true);
|
|
48
|
+
}
|
|
49
|
+
function handleConnection(conn, setName = false) {
|
|
50
|
+
if (setName)
|
|
51
|
+
setOpponentName(conn.metadata || 'Anonymous User');
|
|
52
|
+
connRef.current = conn;
|
|
53
|
+
conn.on('open', () => {
|
|
54
|
+
conn.send({ type: 'messages', messages });
|
|
55
|
+
conn.on('data', ({ type, message, messages }) => {
|
|
56
|
+
if (type === 'message')
|
|
57
|
+
addMessage(message);
|
|
58
|
+
else if (type === 'messages') {
|
|
59
|
+
setMessages(old => {
|
|
60
|
+
if (messages.length > old.length)
|
|
61
|
+
return messages;
|
|
62
|
+
return old;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
19
68
|
useEffect(() => {
|
|
20
|
-
if (!audio) {
|
|
69
|
+
if (!text && !audio) {
|
|
21
70
|
setPeer(undefined);
|
|
22
71
|
return;
|
|
23
72
|
}
|
|
@@ -34,37 +83,88 @@ export default function Chat({ peerId, remotePeerId, peerOptions, onError = () =
|
|
|
34
83
|
return;
|
|
35
84
|
let call;
|
|
36
85
|
peer.on('open', () => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
call = e;
|
|
52
|
-
call.answer(stream);
|
|
86
|
+
if (text)
|
|
87
|
+
handleConnection(peer.connect(remotePeerId, { metadata: name }), true);
|
|
88
|
+
if (audio) {
|
|
89
|
+
const getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
|
|
90
|
+
getUserMedia({
|
|
91
|
+
video: false,
|
|
92
|
+
audio: {
|
|
93
|
+
autoGainControl: false,
|
|
94
|
+
noiseSuppression: true,
|
|
95
|
+
echoCancellation: true
|
|
96
|
+
}
|
|
97
|
+
}, (stream) => {
|
|
98
|
+
localStream.current = stream;
|
|
99
|
+
call = peer.call(remotePeerId, stream);
|
|
53
100
|
call.on('stream', handleRemoteStream);
|
|
54
101
|
call.on('close', call.removeAllListeners);
|
|
55
|
-
|
|
56
|
-
|
|
102
|
+
peer.on('call', e => {
|
|
103
|
+
call = e;
|
|
104
|
+
call.answer(stream);
|
|
105
|
+
call.on('stream', handleRemoteStream);
|
|
106
|
+
call.on('close', call.removeAllListeners);
|
|
107
|
+
});
|
|
108
|
+
}, onError);
|
|
109
|
+
}
|
|
57
110
|
});
|
|
111
|
+
peer.on('connection', handleConnection);
|
|
58
112
|
return () => {
|
|
59
|
-
var _a;
|
|
113
|
+
var _a, _b, _c;
|
|
60
114
|
(_a = localStream.current) === null || _a === void 0 ? void 0 : _a.getTracks().forEach(track => track.stop());
|
|
115
|
+
(_b = connRef.current) === null || _b === void 0 ? void 0 : _b.removeAllListeners();
|
|
116
|
+
(_c = connRef.current) === null || _c === void 0 ? void 0 : _c.close();
|
|
61
117
|
call === null || call === void 0 ? void 0 : call.removeAllListeners();
|
|
62
118
|
call === null || call === void 0 ? void 0 : call.close();
|
|
63
119
|
peer.removeAllListeners();
|
|
64
120
|
peer.destroy();
|
|
65
121
|
};
|
|
66
122
|
}, [peer]);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
var _a, _b;
|
|
125
|
+
if (dialog)
|
|
126
|
+
(_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.show();
|
|
127
|
+
else
|
|
128
|
+
(_b = dialogRef.current) === null || _b === void 0 ? void 0 : _b.close();
|
|
129
|
+
}, [dialog]);
|
|
130
|
+
useEffect(() => {
|
|
131
|
+
const container = containerRef.current;
|
|
132
|
+
if (container)
|
|
133
|
+
container.scrollTop = container.scrollHeight;
|
|
134
|
+
}, [dialog, opponentName, messages]);
|
|
135
|
+
return React.createElement("div", Object.assign({ className: 'main' }, props),
|
|
136
|
+
typeof children === 'function' ? children({ notification, messages, addMessage, dialogRef, audio, setAudio }) : React.createElement(React.Fragment, null,
|
|
137
|
+
text && React.createElement("div", null,
|
|
138
|
+
dialog ? React.createElement(BiSolidMessageX, { onClick: () => setDialog(false) })
|
|
139
|
+
: React.createElement("div", { className: 'notification' },
|
|
140
|
+
React.createElement(BiSolidMessageDetail, { onClick: () => {
|
|
141
|
+
setNotification(false);
|
|
142
|
+
setDialog(true);
|
|
143
|
+
} }),
|
|
144
|
+
notification && React.createElement("span", { className: 'badge' })),
|
|
145
|
+
React.createElement("dialog", { ref: dialogRef, className: `${dialog ? 'dialog' : ''} position-${(dialogOptions === null || dialogOptions === void 0 ? void 0 : dialogOptions.position) || 'center'}`, style: dialogOptions === null || dialogOptions === void 0 ? void 0 : dialogOptions.style },
|
|
146
|
+
React.createElement("div", { className: 'heading' }, "Chat"),
|
|
147
|
+
React.createElement("hr", null),
|
|
148
|
+
React.createElement("div", null,
|
|
149
|
+
React.createElement("div", { ref: containerRef, className: 'message-container' }, opponentName && messages.map(({ id, text }, i) => React.createElement("div", { key: i },
|
|
150
|
+
React.createElement("strong", null,
|
|
151
|
+
id === peerId ? 'You' : opponentName,
|
|
152
|
+
": "),
|
|
153
|
+
React.createElement("span", null, text)))),
|
|
154
|
+
React.createElement("hr", null),
|
|
155
|
+
React.createElement("form", { className: 'input-container', onSubmit: e => {
|
|
156
|
+
var _a;
|
|
157
|
+
e.preventDefault();
|
|
158
|
+
const text = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.value;
|
|
159
|
+
if (text) {
|
|
160
|
+
inputRef.current.value = '';
|
|
161
|
+
addMessage({ id: peerId, text }, true);
|
|
162
|
+
}
|
|
163
|
+
} },
|
|
164
|
+
React.createElement("input", { ref: inputRef, className: 'input', placeholder: 'Enter a message' }),
|
|
165
|
+
React.createElement("button", { type: 'submit' },
|
|
166
|
+
React.createElement(GrSend, null)))))),
|
|
167
|
+
voice && React.createElement("div", null, audio ? React.createElement(BsFillMicFill, { title: "Turn mic off", onClick: () => setAudio(false) }) : React.createElement(BsFillMicMuteFill, { title: "Turn mic on", onClick: () => setAudio(true) }))),
|
|
168
|
+
voice && audio && React.createElement("audio", { ref: streamRef, autoPlay: true, style: { display: 'none' } }));
|
|
70
169
|
}
|
|
170
|
+
export const clearChat = () => removeStorage('rpc-messages');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
const setStorage = (key, value, local = false) => (local ? localStorage : sessionStorage).setItem(key, JSON.stringify(value));
|
|
3
|
-
const removeStorage = (key, local = false) => (local ? localStorage : sessionStorage).removeItem(key);
|
|
3
|
+
export const removeStorage = (key, local = false) => (local ? localStorage : sessionStorage).removeItem(key);
|
|
4
4
|
const getStorage = (key, fallbackValue, local = false) => {
|
|
5
5
|
if (typeof window === "undefined")
|
|
6
6
|
return fallbackValue;
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-peer-chat",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "An easy to use react component for impleting peer-to-peer chatting.",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"
|
|
8
|
+
"copy": "copy .\\src\\*.css build",
|
|
9
|
+
"build": "npm i && tsc && npm run copy"
|
|
9
10
|
},
|
|
10
11
|
"repository": {
|
|
11
12
|
"type": "git",
|
|
@@ -38,4 +39,4 @@
|
|
|
38
39
|
"dependencies": {
|
|
39
40
|
"peerjs": "^1.5.0"
|
|
40
41
|
}
|
|
41
|
-
}
|
|
42
|
+
}
|