forked from fullcalendar/fullcalendar
-
Notifications
You must be signed in to change notification settings - Fork 2
/
rollup.bundles.js
36 lines (31 loc) · 1.02 KB
/
rollup.bundles.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const path = require('path')
const nodeResolve = require('@rollup/plugin-node-resolve').default
const alias = require('@rollup/plugin-alias')
const { checkNoSymlinks, buildBanner } = require('./scripts/lib/new')
const { removeStylesheetImports, buildAliasMap, injectReleaseDateAndVersion } = require('./scripts/lib/new-rollup')
/*
needs tsc to run first
but needs symlinks killed also
compiles from TSC files
*/
const { bundleStructs, publicPackageStructs } = require('./scripts/lib/package-index')
checkNoSymlinks(bundleStructs)
module.exports = bundleStructs.map((struct) => {
return {
input: path.join(struct.dir, struct.mainTscJs),
output: {
format: 'iife',
name: 'FullCalendar',
file: path.join(struct.dir, struct.mainDistJs),
banner: buildBanner(struct.isPremium)
},
plugins: [
removeStylesheetImports(),
alias({
entries: buildAliasMap(publicPackageStructs) // TODO: do this outside loop
}),
nodeResolve(),
injectReleaseDateAndVersion()
]
}
})