Browse Source

Polyfill Promise using es6-promise dependency

Herbert Vojčík 8 years ago
parent
commit
fa2681fdd0
4 changed files with 20 additions and 1 deletions
  1. 4 1
      bower.json
  2. 5 0
      es6-promise.amd.json
  3. 3 0
      index.js
  4. 8 0
      local.amd.json

+ 4 - 1
bower.json

@@ -24,5 +24,8 @@
     "bower_components",
     "test",
     "tests"
-  ]
+  ],
+  "dependencies": {
+    "es6-promise": "^3.0.2"
+  }
 }

+ 5 - 0
es6-promise.amd.json

@@ -0,0 +1,5 @@
+{
+  "paths": {
+    "amber/es6-promise": "./promise"
+  }
+}

+ 3 - 0
index.js

@@ -0,0 +1,3 @@
+define(['amber/es6-promise'], function (promiseLib) {
+    promiseLib.polyfill();
+});

+ 8 - 0
local.amd.json

@@ -0,0 +1,8 @@
+{
+  "paths": {
+    "amber/es2015-polyfills": "./index"
+  },
+  "shim": {
+    "amber/browser-compatibility": ["./es2015-polyfills"]
+  }
+}