@ucd-lib/cork-app-load

0.3.2 • Public • Published

cork-app-load

polyfill and polymer app build loader

Install

add to client dependencies

yarn add @ucd-lib/cork-app-load

link to client folder

ln -s node_modules/@ucd-lib/cork-app-load/lib loader

add loader to html

<script src="/loader/loader.js"></script>

The loader expects javscript bundles to exist. /js/bundle.js for all modern browsers and /js/ie-bundle.js for all older browsers. See cork-app-build for bundler instructions.

Cache-Control

To break to check you can optionally define CORK_LOADER_VERSIONS before you insert the loader script and the loader will append a version flag to polyfill and bundle requests breaking any cache control header on update.

Example:

<script>
var CORK_LOADER_VERSIONS = {
  loader : '0.0.3',
  bundle : '0.1.0'
}
<script>
<script src="/loader/loader.js?_=0.0.3"></script>

This will load make the following request on modern browsers:

  • /loader/loader.js?_=0.0.3
  • /loader/polyfills/webcomponents-loader.js?_=0.0.3
  • /loader/polyfills/bundles/webcomponents-*.js?_=0.0.3 (if required)
  • /js/bundle.js?_=0.1.0

Or for IE:

  • /loader/loader.js?_=0.0.3
  • /loader/polyfills/babel-polyfill.js?_=0.0.3
  • /loader/polyfills/webcomponents-loader.js?_=0.0.3
  • /loader/polyfills/bundles/webcomponents-*.js?_=0.0.3
  • /js/ie-bundle.js?_=0.1.0

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.23latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.23
0.3.10
0.3.00
0.1.30
0.1.20
0.1.10
0.1.00
0.0.41
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i @ucd-lib/cork-app-load

Weekly Downloads

4

Version

0.3.2

License

MIT

Unpacked Size

1.96 MB

Total Files

16

Last publish

Collaborators

  • ucdust
  • jrmerz
  • qjhart
  • steveisgreat