|
|
@@ -29,9 +29,8 @@ module.exports = function (grunt) {
|
|
|
grunt.registerTask('devel', ['amdconfig:app', 'requirejs:devel']);
|
|
|
grunt.registerTask('deploy', ['amdconfig:app', 'requirejs:deploy']);
|
|
|
|
|
|
- var polyfillThenPromiseApp = function () {
|
|
|
- define(["require", "amber/es6-promise"], function (require, promiseLib) {
|
|
|
- promiseLib.polyfill();
|
|
|
+ var promiseApp = function () {
|
|
|
+ define(["require"], function (require) {
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
require(["__app__"], resolve, reject);
|
|
|
});
|
|
|
@@ -73,7 +72,7 @@ module.exports = function (grunt) {
|
|
|
options: {
|
|
|
mainConfigFile: "config.js",
|
|
|
rawText: {
|
|
|
- "app": '(' + polyfillThenPromiseApp + '());',
|
|
|
+ "app": '(' + promiseApp + '());',
|
|
|
"__app__": 'define(["deploy", "amber/core/Platform-Browser"],function(x){return x});'
|
|
|
},
|
|
|
pragmas: {
|
|
|
@@ -90,7 +89,7 @@ module.exports = function (grunt) {
|
|
|
options: {
|
|
|
mainConfigFile: "config.js",
|
|
|
rawText: {
|
|
|
- "app": '(' + polyfillThenPromiseApp + '());',
|
|
|
+ "app": '(' + promiseApp + '());',
|
|
|
"__app__": 'define(["devel", "amber/core/Platform-Browser"],function(x){return x});'
|
|
|
},
|
|
|
include: ['config', 'node_modules/requirejs/require', 'app', '__app__'],
|
|
|
@@ -110,7 +109,7 @@ module.exports = function (grunt) {
|
|
|
});
|
|
|
});
|
|
|
} + "());",
|
|
|
- "app": "(" + polyfillThenPromiseApp + "());"
|
|
|
+ "app": "(" + promiseApp + "());"
|
|
|
},
|
|
|
paths: {"amber_devkit": helpers.libPath},
|
|
|
pragmas: {
|