Skip to content

Commit

Permalink
Treat @hebcal/triennial as external for packaging.
Browse files Browse the repository at this point in the history
Add new iife for dist/fullcalendar.js for smaller browser packaging
  • Loading branch information
mjradwin committed Aug 26, 2022
1 parent b6fbd5f commit 395a60b
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 51 deletions.
86 changes: 43 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hebcal/rest-api",
"version": "4.1.0",
"version": "4.2.0",
"author": "Michael J. Radwin (https://github.com/mjradwin)",
"keywords": [
"hebcal"
Expand All @@ -21,9 +21,9 @@
"url": "https://github.com/hebcal/hebcal-rest-api/issues"
},
"dependencies": {
"@hebcal/core": "^3.42.2",
"@hebcal/leyning": "^6.0.0",
"@hebcal/triennial": "^1.0.0"
"@hebcal/core": "^3.42.3",
"@hebcal/leyning": "^6.0.3",
"@hebcal/triennial": "^1.0.1"
},
"scripts": {
"build": "rollup -c",
Expand Down Expand Up @@ -51,8 +51,8 @@
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"ava": "^4.3.1",
"core-js": "^3.24.1",
"ava": "^4.3.3",
"core-js": "^3.25.0",
"eslint": "^8.22.0",
"eslint-config-google": "^0.14.0",
"jsdoc": "^3.6.11",
Expand Down
44 changes: 42 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default [
nodeResolve(),
commonjs(),
],
external: ['@hebcal/core', '@hebcal/leyning'],
external: ['@hebcal/core', '@hebcal/leyning', '@hebcal/triennial'],
},
{
input: 'src/index.js',
Expand All @@ -54,7 +54,7 @@ export default [
nodeResolve(),
commonjs(),
],
external: ['@hebcal/core', '@hebcal/leyning'],
external: ['@hebcal/core', '@hebcal/leyning', '@hebcal/triennial'],
},
{
input: 'src/index.js',
Expand All @@ -66,6 +66,7 @@ export default [
globals: {
'@hebcal/core': 'hebcal',
'@hebcal/leyning': 'hebcal__leyning',
'@hebcal/triennial': 'hebcal__triennial',
},
indent: false,
banner,
Expand All @@ -77,6 +78,7 @@ export default [
globals: {
'@hebcal/core': 'hebcal',
'@hebcal/leyning': 'hebcal__leyning',
'@hebcal/triennial': 'hebcal__triennial',
},
plugins: [terser()],
banner,
Expand Down Expand Up @@ -105,6 +107,44 @@ export default [
nodeResolve(),
commonjs(),
],
external: ['@hebcal/core', '@hebcal/leyning', '@hebcal/triennial'],
},
{
input: 'src/fullcalendar.js',
output: [
{
file: 'dist/fullcalendar.js',
format: 'iife',
name: 'hebcalFullCalendar',
globals: {
'@hebcal/core': 'hebcal',
'@hebcal/leyning': 'hebcal__leyning',
},
indent: false,
banner,
},
{
file: 'dist/fullcalendar.min.js',
format: 'iife',
name: 'hebcalFullCalendar',
globals: {
'@hebcal/core': 'hebcal',
'@hebcal/leyning': 'hebcal__leyning',
},
plugins: [terser()],
banner,
},
],
plugins: [
json({compact: true}),
babel({
babelHelpers: 'bundled',
presets: ['@babel/preset-env'],
exclude: ['node_modules/**'],
}),
nodeResolve(),
commonjs(),
],
external: ['@hebcal/core', '@hebcal/leyning'],
},
];

0 comments on commit 395a60b

Please sign in to comment.