[API] UMD Packaging (#1078)

* [Bundle] load filter with requirejs

* [Build] Use almond, wrap in UMD

Use almond for built version of application and wrap in UMD so that
it supports requirejs, commonjs, and basic browser loading.

* [Main] Can choose where to load app

MCT.run allows you to specify a dom element to load application
within.  If element is not specified, will use body.

* [MCT] set class on injected div

Set class on injected div so extra markup is not required.

* [Build] Re-enable optimize

* Add minimal bootstrap example
This commit is contained in:
Pete Richards
2016-07-07 14:25:23 -07:00
committed by GitHub
parent b55668426d
commit d7ddb96c4e
8 changed files with 45 additions and 7 deletions

View File

@ -54,7 +54,12 @@ var gulp = require('gulp'),
},
options = {
requirejsOptimize: {
name: paths.main.replace(/\.js$/, ''),
name: 'bower_components/almond/almond.js',
include: paths.main.replace('.js', ''),
wrap: {
startFile: "src/start.frag",
endFile: "src/end.frag"
},
mainConfigFile: paths.main,
wrapShim: true
},