You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
815 B
29 lines
815 B
|
|
|
|
// SystemJS support.
|
|
window.self = window;
|
|
require("src/system.bundle.js");
|
|
|
|
const importMapJson = jsb.fileUtils.getStringFromFile("src/import-map.json");
|
|
const importMap = JSON.parse(importMapJson);
|
|
System.warmup({
|
|
importMap,
|
|
importMapUrl: 'src/import-map.json',
|
|
defaultHandler: (urlNoSchema) => {
|
|
require(urlNoSchema.startsWith('/') ? urlNoSchema.substr(1) : urlNoSchema);
|
|
},
|
|
});
|
|
|
|
System.import('./src/application.js')
|
|
.then(({ Application }) => {
|
|
return new Application();
|
|
}).then((application) => {
|
|
return System.import('cc').then((cc) => {
|
|
require('jsb-adapter/engine-adapter.js');
|
|
return application.init(cc);
|
|
}).then(() => {
|
|
return application.start();
|
|
});
|
|
}).catch((err) => {
|
|
console.error(err.toString() + ', stack: ' + err.stack);
|
|
});
|
|
|