Skip to content

Commit

Permalink
use the new esm.run feature by jsDeliv from modules loading
Browse files Browse the repository at this point in the history
shorter urls, happier life !
  • Loading branch information
obiot committed Nov 21, 2021
1 parent fcb922b commit 80c07b0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Using melonJS
Basic Example

```JavaScript
import * as me from "https://cdn.jsdelivr.net/npm/melonjs/dist/melonjs.module.js";
import * as me from "https://esm.run/melonjs";

me.device.onReady(function () {
// initialize the display canvas once the device/browser is ready
Expand Down Expand Up @@ -170,15 +170,11 @@ If you need to import the ES6 module of melonjs (e.g. for Webpack):
Or can simply be added to your html, using [jsDeliver](https://www.jsdelivr.com/package/npm/melonjs) content delivery network (CDN) :

```html
<!-- load the ES5 UMD bundle of melonJS v10.0.0 -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/melonjs.js"></script>
<!-- load the ES6 module bundle of melonJS v10.0.0 -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/melonjs.module.js"></script>
<!-- load the ES6 module bundle of melonJS v10.0 -->
<script src="https://esm.run/[email protected]"></script>
<!-- omit the version completely to get the latest one -->
<!-- you should NOT use this in production -->
<script src="https://cdn.jsdelivr.net/npm/melonjs/dist/melonjs.js"></script>
<!-- add ".min" to any JS/CSS file to get a minified version -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/melonjs.min.js"></script>
<script src="https://esm.run/melonjs"></script>
```
> Note: starting from the 10.0.0 version, the debug plugin is no longer provided as part of the melonJS library release, and has been moved to the official [boilerplate](https://github.com/melonjs/es6-boilerplate)
Expand Down

0 comments on commit 80c07b0

Please sign in to comment.