Skip to content

Commit

Permalink
Merge pull request #483 from Temasys/2.x.x/development
Browse files Browse the repository at this point in the history
Release 2.6.3
  • Loading branch information
dinawee committed Jun 26, 2024
2 parents 61fae49 + ff2809f commit 6ddd400
Show file tree
Hide file tree
Showing 66 changed files with 70 additions and 25,794 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"globals": {
"window": true
},
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SKYLINK WEB SDK 2.6.2
# SKYLINK WEB SDK 2.6.3
> Temasys SkylinkJS Web SDK is an open-source client-side library for your web-browser that enables any website to easily leverage the capabilities of WebRTC and its direct data streaming powers between peers for audio/video conferencing.
You'll need a Temasys Account, and an App key to use this. [Register here to get your App key](https://console.temasys.io).
Expand Down Expand Up @@ -34,13 +34,13 @@ You'll need a Temasys Account, and an App key to use this. [Register here to get
- We recommend that you always use the latest versions of the Temasys SkylinkJS Web SDK as WebRTC is still evolving and we adapt to changes very frequently.
- It is advised to not attach any event handlers to the WebRTC APIs as doing so may override the handlers set in SkylinkJS and result in unexpected behaviour.

[Latest version: 2.6.2](https://github.com/Temasys/SkylinkJS/releases/tag/2.6.2)
[Latest version: 2.6.3](https://github.com/Temasys/SkylinkJS/releases/tag/2.6.3)


## How to build your own Temasys SkylinkJS Web SDK
Using [Git](https://git-scm.com/download) command line tools, execute the following:

Node version: `14.17.5`
Node version: `20.14.0 (lts/iron)`

```
# 1. Clone or download this repository via git terminal.
Expand Down
2 changes: 1 addition & 1 deletion configs/jsdoc/jsdoc.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"monospaceLinks": false
},
"opts": {
"template": "../../temasys-jsdoc-template",
"template": "node_modules/docdash",
"destination": "./docs",
"encoding": "utf8",
"readme": "README.md",
Expand Down
25 changes: 8 additions & 17 deletions configs/rollup/rollup.dev.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable import/no-extraneous-dependencies */
import localResolve from 'rollup-plugin-local-resolve';
import resolve from 'rollup-plugin-node-resolve';
import commonJS from 'rollup-plugin-commonjs';
import { terser } from 'rollup-plugin-terser';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonJS from '@rollup/plugin-commonjs';
import terser from '@rollup/plugin-terser';
import externalGlobals from 'rollup-plugin-external-globals';
import del from 'rollup-plugin-delete';
import json from '@rollup/plugin-json';
Expand All @@ -12,7 +12,6 @@ import CONSTANTS from './constants';

const globals = { 'socket.io-client': 'io' };
const external = ['socket.io-client'];
const WRTC_AJS_DEST_PATH = `${paths.appNodeModules}/webrtc-adapter/out/adapter.js`;
const BUILD_PATH = paths.appBuild;
const banner = `/* SkylinkJS v${pkg.version} ${new Date().toString()} */`;
// eslint-disable-next-line prefer-destructuring
Expand All @@ -35,7 +34,7 @@ const config = {
name: 'Skylink',
globals,
banner,
}
},
],
onwarn: (warning, warn) => {
// skip certain warnings
Expand All @@ -45,13 +44,9 @@ const config = {
},
plugins: [
json({ compact: true }),
resolve({
only: ['webrtc-adapter', 'clone', 'crypto-js', 'sdp', 'rtcpeerconnection-shim'],
}),
nodeResolve(),
commonJS({
namedExports: {
[WRTC_AJS_DEST_PATH]: ['AdapterJS'],
},
strictRequires: true,
}),
externalGlobals(globals),
localResolve(),
Expand Down Expand Up @@ -90,13 +85,9 @@ const configMin = {
},
plugins: [
json({ compact: true }),
resolve({
only: ['webrtc-adapter', 'clone', 'crypto-js', 'sdp', 'rtcpeerconnection-shim'],
}),
nodeResolve(),
commonJS({
namedExports: {
[WRTC_AJS_DEST_PATH]: ['AdapterJS'],
},
strictRequires: true,
}),
terser({
// include: [/^.+\.min\.umd\.js$/, /^.+\.min\.js$/],
Expand Down
38 changes: 32 additions & 6 deletions configs/rollup/rollup.prod.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable import/no-extraneous-dependencies */
import gzipPlugin from 'rollup-plugin-gzip';
import copy from 'rollup-plugin-copy';
import del from 'rollup-plugin-delete';
import { terser } from 'rollup-plugin-terser';
import PATHS from '../paths';
import CONSTANTS from './constants';
import pkg from '../../package.json';

const gzipPlugin = require('rollup-plugin-gzip').default;

const BUILD_PATH = PATHS.appBuild;
const PUBLISH_PATH = PATHS.appPublish;
const DOCS_PATH = PATHS.appDocs;
Expand All @@ -27,12 +27,12 @@ const getOptions = (folderName, file) => ({
},
},
gzip: {
fileName: () => `${PUBLISH_PATH}/${folderName}/gzip/${file}`,
fileName: () => `${file}`,
},
copy: {
targets: [
{ src: DOCS_PATH, dest: `${PUBLISH_PATH}/${folderName}` },
{ src: COLLECTION_DEMOS_PATH, dest: `${PUBLISH_PATH}/${folderName}/demos` },
{ src: COLLECTION_DEMOS_PATH, dest: `/${PUBLISH_PATH}/${folderName}/demos` },
{ src: `${PUBLISH_PATH}/${folderName}/demos/collection/${DEMOS[0]}/main.js`, dest: `${PUBLISH_PATH}/${folderName}/demos/collection/${DEMOS[0]}`, transform: replaceImportSrc },
{ src: `${PUBLISH_PATH}/${folderName}/demos/collection/${DEMOS[1]}/main.js`, dest: `${PUBLISH_PATH}/${folderName}/demos/collection/${DEMOS[1]}`, transform: replaceImportSrc },
{ src: `${PUBLISH_PATH}/${folderName}/demos/collection/${DEMOS[2]}/main.js`, dest: `${PUBLISH_PATH}/${folderName}/demos/collection/${DEMOS[2]}`, transform: replaceImportSrc },
Expand All @@ -56,26 +56,52 @@ const generateConfig = (options) => {
},
],
plugins: [
//terser(OPTIONS.minify),
gzipPlugin(OPTIONS.gzip),
copy(OPTIONS.copy),
],
};
CONFIGS.push(config);
}
});

// Delete at the start of the build
CONFIGS[0].plugins.push(del({
targets: `${PUBLISH_PATH}`,
verbose: true,
}));
};

const generateGzipConfig = (fileNames) => {
CONSTANTS.FOLDERS.forEach((folderName) => {
for (let i = 0; i < fileNames.length; i += 1) {
const fileName = fileNames[i];
const config = {
input: `${PUBLISH_PATH}/${folderName}/${fileName}`,
output: [
{
file: `${PUBLISH_PATH}/${folderName}/gzip/${fileName}`,
},
],
plugins: [
gzipPlugin({ fileName: () => `${fileName}` }),
],
};
CONFIGS.push(config);
}
});
};

generateConfig([
{ fileName: CONSTANTS.BUILD_JS.esm.fileName, format: CONSTANTS.BUILD_JS.esm.format },
{ fileName: CONSTANTS.BUILD_JS.esm.minFileName, format: CONSTANTS.BUILD_JS.esm.format },
{ fileName: CONSTANTS.BUILD_JS.umd.fileName, format: CONSTANTS.BUILD_JS.umd.format },
{ fileName: CONSTANTS.BUILD_JS.umd.minFileName, format: CONSTANTS.BUILD_JS.umd.format },
]);

generateGzipConfig([
CONSTANTS.BUILD_JS.esm.fileName,
CONSTANTS.BUILD_JS.esm.minFileName,
CONSTANTS.BUILD_JS.umd.fileName,
CONSTANTS.BUILD_JS.umd.minFileName,
]);

export default CONFIGS;
Loading

0 comments on commit 6ddd400

Please sign in to comment.