Fullcalendar: Provide browser-global JS file for all packages

Created on 15 Jul 2020  路  3Comments  路  Source: fullcalendar/fullcalendar

Version 5 introduced the fullcalendar and fullcalendar-scheduler bundles which allow easy consumption of FullCalendar's packages when you are in a script-tag browser-global environment.

The bundles do not include every package though, namely the @fullcalendar/rrule package. This makes some people sad/mad.

PROPOSAL: have each package output a browser-global-compatible JS file. If the package depends on other packages, such as the rrule package, it will access them via browser global as well.

ALSO, when using these browser-global dist files of each package, plugins will automatically be registered when their <script> tags are executed. No need to pass anything to the plugins array.

Accepted Distribution

Most helpful comment

As of v5.2.0, all packages provide a browser-global version of their JS. Whereas the fullcalendar and fullcalendar-scheduler bundles make these available as <package-root>/main.js, all other packages make them available at <package-root>/main.global.js.

I've made a demo specifically for RRule:
https://fullcalendar.io/docs/rrule-plugin#usage-with-script-tags

All 3 comments

@21Junipers, you mentioned in a previous comment that you felt the lack of a browser-global rrule connector was a regression. This ticket attempts to address that.

Thank you @arshaw. Question: In PROPOSAL you mention "If the package depends on other packages".. How is that dependency defined?

Other than that, If I understand the correctly, with this proposed change, in cases where a build system in not in used/available, fullcalendar can be initialized with script tags as described in the docs.

And (per ALSO) if rrule.js is included as an additional script tag, it will automatically be registered. In effect, allowing the use of fullcalendar v5 including rrule.js with two script tags and no need to understand the dependency tree. If I do understand correctly this seems like an elegant solution (to me, not the most experienced dev on the planet/island).

As of v5.2.0, all packages provide a browser-global version of their JS. Whereas the fullcalendar and fullcalendar-scheduler bundles make these available as <package-root>/main.js, all other packages make them available at <package-root>/main.global.js.

I've made a demo specifically for RRule:
https://fullcalendar.io/docs/rrule-plugin#usage-with-script-tags

Was this page helpful?
0 / 5 - 0 ratings