Skip to content

Commit

Permalink
chore(desktopjs): generating IIFE bundle with rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
kruplm committed Apr 26, 2024
1 parent 651c062 commit 7ec2b41
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/desktopjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"main": "dist/desktop.js",
"types": "dist/desktopjs.d.ts",
"type": "module",
"license": "Apache-2.0",
"author": "Morgan Stanley",
"repository": {
Expand All @@ -29,9 +30,11 @@
"dist"
],
"scripts": {
"clean": "gulp clean",
"build:workspaces": "gulp build:workspaces",
"build": "gulp build",
"clean:dist": "rimraf dist",
"clean:build": "rimraf build",
"clean": "npm run clean:dist && npm run clean:build",
"bundle": "rollup -c",
"build": "npm run clean && tsc && npm run bundle",
"test": "gulp test",
"deploy": "npm publish --provenance --access public",
"prepublishOnly": "copyfiles ../../README.md . -u 2"
Expand Down
16 changes: 16 additions & 0 deletions packages/desktopjs/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';


export default {
input: 'build/desktop.js',
output: {
file: 'dist/iife/desktop.js',
format: 'iife',
name: 'desktop'
},
plugins: [
resolve(),
commonjs()
]
};

0 comments on commit 7ec2b41

Please sign in to comment.