1
0
mirror of https://github.com/flarum/core.git synced 2025-07-20 16:21:18 +02:00

Use System.get instead of System.import

Means we get drop Promise polyfill
This commit is contained in:
Toby Zerner
2015-07-27 14:16:39 +09:30
parent de610eac35
commit d82da543b4
3 changed files with 15 additions and 20 deletions

View File

@@ -9,7 +9,6 @@
"color-thief": "v2.0", "color-thief": "v2.0",
"mithril": "lhorie/mithril.js#next", "mithril": "lhorie/mithril.js#next",
"es6-micro-loader": "caridy/es6-micro-loader#v0.2.1", "es6-micro-loader": "caridy/es6-micro-loader#v0.2.1",
"es6-promise-polyfill": "~1.0.0",
"fastclick": "~1.0.6" "fastclick": "~1.0.6"
} }
} }

View File

@@ -7,7 +7,6 @@ gulp({
files: [ files: [
nodeDir + '/babel-core/external-helpers.js', nodeDir + '/babel-core/external-helpers.js',
bowerDir + '/es6-promise-polyfill/promise.js',
bowerDir + '/es6-micro-loader/dist/system-polyfill.js', bowerDir + '/es6-micro-loader/dist/system-polyfill.js',
bowerDir + '/mithril/mithril.js', bowerDir + '/mithril/mithril.js',

View File

@@ -26,10 +26,8 @@
@endforeach @endforeach
<script> <script>
var app;
System.import('flarum/app').then(function(module) {
try { try {
app = module.default; var app = System.get('flarum/app').default;
app.preload = { app.preload = {
data: {!! json_encode($data) !!}, data: {!! json_encode($data) !!},
document: {!! json_encode($document) !!}, document: {!! json_encode($document) !!},
@@ -45,7 +43,6 @@
document.write('<div class="container">Something went wrong.</div>'); document.write('<div class="container">Something went wrong.</div>');
throw e; throw e;
} }
});
</script> </script>
@if ($content) @if ($content)