forked from melonjs/melonJS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use the new esm.run feature by jsDeliv from modules loading
shorter urls, happier life !
- Loading branch information
Showing
1 changed file
with
4 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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) | ||
|