aurelia-script
This repo is the home for Aurelia's concatenated script-tag-ready build.
To keep up to date on Aurelia, please visit and subscribe to the official blog and our email list. We also invite you to follow us on twitter. If you have questions, please join our community on Gitter or use stack overflow. Documentation can be found in our developer hub.
Online Playground with Single file script
- Codesandbox: https://codesandbox.io/s/wnr6zxv6vl
- Codepen: https://codepen.io/bigopon/pen/MzGLZe
- With Aurelia Store: https://codesandbox.io/s/n3r48qvzjl
- With Aurelia UI Virtualization: https://codesandbox.io/s/m781l8oyqj
- With Aurelia Dialog: https://codesandbox.io/s/62lmyy16xn
- With Aurelia Validation: https://codesandbox.io/s/6y1zzon47r
Build
- Install the dependencies
npm install
- Run either the build / bundle script
# Build only core
npm run build
# Or full build, with router
npm run bundle
Run the example project
- Go to example folder inside this project
- Start a http server
- Navigate to
index.html
in browser
How it works?
dist
folder contains built result of all aurelia bundles, together with their minified versions, with different scopes:- bundles with names ending in
.esm.js
are in ESM (ECMAScript Module) format. bundles with names ending in.umd.js
are in UMD (Universal Module Definition) format. aurelia.esm.js
,aurelia.umd.js
are bundles without router feature. Typically used when you want to minimized to script included in your page.aurelia_router.esm.js
,aurelia_router.umd.js
are bundles of with router feature.
- bundles with names ending in
example
folder contains an example application to get started. Step to run it included in the section abovescripts
folder contains all built result of all aurelia core modules, in AMD module format for environment likegistrun
(https://gist.run)build
folder contains entry/ setup script, code for building / emiting code todist
andexample
folders.index.js
andindex.full.js
are custom entries to give rollup instruction how to bundle all core modules.index.js
will result in a bundle without router related features.index.full.js
will result in a bundle with all features.rollup.config.js
is rollup config for runningnpm run bundle
andnpm run build
scripts
Notes:
aurelia-script
uses new ECMAScript feature: dynamic import via import()
API. If your target browser does not support such API, aurelia-script
won't be able to run. Browser support matrix is at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Browser_compatibility (check for Dynamic import)