├── LICENSE
├── README.md
├── es2015.js
├── es2017.js
├── es5.js
├── index.html
└── ubl.js
/LICENSE:
--------------------------------------------------------------------------------
1 | ISC License
2 |
3 | Copyright (c) 2017-current, Andrea Giammarchi, @WebReflection
4 |
5 | Permission to use, copy, modify, and/or distribute this software for any
6 | purpose with or without fee is hereby granted, provided that the above
7 | copyright notice and this permission notice appear in all copies.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 | OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 | PERFORMANCE OF THIS SOFTWARE.
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ubl
2 | JavaScript Universal Bundle Loader, as explained in [this Medium post](https://medium.com/@WebReflection/a-universal-bundle-loader-6d7f3e628f93).
3 |
4 | **[Live demo](https://webreflection.github.io/ubl/)**
5 |
6 | ```html
7 |
8 |
9 |
10 |
11 |
12 |
13 | JS Universal Bundle Loader
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | ```
22 |
--------------------------------------------------------------------------------
/es2015.js:
--------------------------------------------------------------------------------
1 | document.body.appendChild(
2 | document.createElement('p')
3 | ).textContent = 'ES2015';
--------------------------------------------------------------------------------
/es2017.js:
--------------------------------------------------------------------------------
1 | document.body.appendChild(
2 | document.createElement('p')
3 | ).textContent = 'ES2017';
--------------------------------------------------------------------------------
/es5.js:
--------------------------------------------------------------------------------
1 | document.body.appendChild(
2 | document.createElement('p')
3 | ).textContent = 'ES5';
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | JS Universal Bundle Loader
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ubl.js:
--------------------------------------------------------------------------------
1 | (function(g,d,s){if(!g.ESM){
2 | s=d.documentElement;s=s.insertBefore(d.createElement('script'),s.lastChild);
3 | s.type='text/javascript';s.src=g.Reflect?'es2015.js':'es5.js';
4 | }}(window,document));
--------------------------------------------------------------------------------