Skip to content

Commit

Permalink
Merge pull request #25 from mynaparrot/auto_recording
Browse files Browse the repository at this point in the history
fixed for `CommonJS`
  • Loading branch information
jibon57 authored Nov 20, 2022
2 parents e0e6171 + f50f514 commit fa2c8e0
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 18 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
run: |
npm install
npm run build
rsync -ar package.json README.md LICENSE ./dist/
cd dist
npm config set '//registry.npmjs.org/:_authToken' $NPM_TOKEN
npm publish
env:
Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
tsconfig.json
tsconfig-cjs.json
tslint.json
.prettierrc
.eslintignore
.eslintrc.js
.DS_Store
node_modules/
src/
examples/
docs/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install plugnmeet-sdk-js
JavaScript:

```js
const plugNmeet = require('plugnmeet-sdk-js').PlugNmeet;
const plugNmeet = require('plugnmeet-sdk-js/cjs').PlugNmeet;

// now
const pnm = new plugNmeet(
Expand Down
2 changes: 1 addition & 1 deletion examples/getActiveRoomInfo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const plugNmeet = require('../dist').PlugNmeet;
const plugNmeet = require('../dist/cjs').PlugNmeet;

(async () => {
const pnm = new plugNmeet(
Expand Down
2 changes: 1 addition & 1 deletion examples/getRecordings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const plugNmeet = require('../dist').PlugNmeet;
const plugNmeet = require('../dist/cjs').PlugNmeet;

(async () => {
const pnm = new plugNmeet(
Expand Down
2 changes: 1 addition & 1 deletion examples/quickJoin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const plugNmeet = require('../dist').PlugNmeet;
const plugNmeet = require('../dist/cjs').PlugNmeet;

(async () => {
const roomId = "room01"; // must be unique.
Expand Down
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
{
"name": "plugnmeet-sdk-js",
"version": "1.2.0",
"type": "module",
"version": "1.2.1",
"description": "plugNmeet JS SDK",
"author": "Jibon L. Costa",
"license": "MIT",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": "./index.js"
},
"typesVersions": {
"*": {
"index.d.ts": ["index.d.ts"]
}
"types": "./dist/src/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/cjs/index.js"
},
"files": [
"dist",
"src"
],
"scripts": {
"start": "rm -rf ./dist && concurrently -c \"red,green\" --kill-others \"tsc --watch -p . --outDir ./dist && esw -w --ext '.ts','.js' --fix\"",
"build": "rm -rf ./dist && tsc -p . --outDir ./dist",
"build": "rm -rf ./dist && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
"build-docs": "typedoc --sort source-order"
},
"devDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"target": "es2015",
"outDir": "./dist/cjs"
},
}
5 changes: 2 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"target": "ES2020",
"module": "ES2020",
"outDir": "dist",
"lib": [
"es2020", "DOM"
],
"lib": ["ES2020"],
"declaration": true,
"sourceMap": true,
"strict": true,
Expand All @@ -15,6 +13,7 @@
"skipLibCheck": true /* Skip type checking of declaration files. */,
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
},
"exclude": ["node_modules", "dist"],
"include": ["src/**/*"],
"typedocOptions": {
"entryPoints": ["src/index.ts"],
Expand Down

0 comments on commit fa2c8e0

Please sign in to comment.