Skip to content

Commit

Permalink
make a JS library for other clients
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed Jan 9, 2019
1 parent 76d73b0 commit 878ec06
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
16 changes: 16 additions & 0 deletions webui/src/jslib.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2019-present, Frederick Emmott.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the LICENSE file
* in the root directory of this source tree.
*/

import RPCClient from './RPCClient';
import handshake from './handshake';

window['StreamingRemote'] = {
RPCClient,
handshake,
};

7 changes: 5 additions & 2 deletions webui/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
const path = require('path');

module.exports = {
entry: './src/index.ts',
entry: {
bundle: './src/index.ts',
jslib: './src/jslib.ts',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
filename: '[name].js'
},
resolve: {
extensions: [".ts", ".tsx", ".js"],
Expand Down

0 comments on commit 878ec06

Please sign in to comment.