Skip to content

Commit

Permalink
feat(WEBRTC-151): Improve production code (#38)
Browse files Browse the repository at this point in the history
* added minify and uglify

* removed adapter-webrtc
  • Loading branch information
DeividVeloso authored Aug 26, 2020
1 parent e69a81c commit c41e0ec
Show file tree
Hide file tree
Showing 12 changed files with 14,105 additions and 2,750 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"license": "MIT",
"devDependencies": {
"@types/jest": "^26.0.9",
"babel-jest": "^26.1.0",
"jest": "^26.2.2",
"ts-jest": "^26.1.4",
"typescript": "^3.9.7",
"babel-jest": "^26.1.0"
"typescript": "^3.9.7"
}
}
8 changes: 8 additions & 0 deletions packages/js/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
presets: ['@babel/preset-env'],
env: {
production: {
presets: ['minify'],
},
},
};
8,527 changes: 8,527 additions & 0 deletions packages/js/examples/react-audio/yarn.lock

Large diffs are not rendered by default.

6,070 changes: 4,031 additions & 2,039 deletions packages/js/package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions packages/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test": "jest",
"docs": "typedoc src --externalPattern **/ReactNative/**",
"release": "release-it",
"compile": "tsc -w"
"compile": "../../node_modules/.bin/tsc -w"
},
"engines": {
"node": ">=11"
Expand All @@ -35,10 +35,10 @@
"license": "MIT",
"dependencies": {
"loglevel": "^1.6.8",
"uuid": "^7.0.3",
"webrtc-adapter": "^7.7.0"
"uuid": "^7.0.3"
},
"devDependencies": {
"@babel/preset-env": "^7.11.0",
"@types/uuid": "^7.0.0",
"@types/webrtc": "0.0.26",
"@typescript-eslint/eslint-plugin": "^3.6.1",
Expand All @@ -56,6 +56,7 @@
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.0.2",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^7.0.0",
"rollup-plugin-typescript2": "^0.24.0",
"typedoc": "^0.15.0",
"typedoc-plugin-markdown": "^2.2.6"
Expand Down
8 changes: 6 additions & 2 deletions packages/js/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import pkg from './package.json';
import resolve from 'rollup-plugin-node-resolve';
import commonJS from 'rollup-plugin-commonjs';
import typescript from 'rollup-plugin-typescript2';
import { terser } from 'rollup-plugin-terser';
import pkg from './package.json';

const input = 'src/index.ts';
const output = [
Expand All @@ -23,7 +24,10 @@ const plugins = [
extensions: ['.mjs', '.js', '.jsx', '.json', '.ts'],
}),
commonJS(),
typescript(),
typescript({
objectHashIgnoreUnknownHack: true,
}),
terser(),
];

export default [
Expand Down
1 change: 0 additions & 1 deletion packages/js/src/Modules/Verto/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'webrtc-adapter';
import BrowserSession from './BrowserSession';
import { SubscribeParams, BroadcastParams } from './util/interfaces';
import { CallOptions } from './webrtc/interfaces';
Expand Down
Loading

0 comments on commit c41e0ec

Please sign in to comment.