Przeglądaj źródła

Change type to module.

Herby Vojčík 5 miesięcy temu
rodzic
commit
ebe7f1c83f
2 zmienionych plików z 4 dodań i 32 usunięć
  1. 0 24
      lib/node.js
  2. 4 8
      package.json

+ 0 - 24
lib/node.js

@@ -1,24 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-    value: true
-});
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/*
- * Deferred pattern built on top of Promise.
- */
-
-var Deferred = function Deferred() {
-    var _this = this;
-
-    _classCallCheck(this, Deferred);
-
-    this.promise = new Promise(function (resolve, reject) {
-        _this.resolve = resolve;
-        _this.reject = reject;
-    });
-};
-
-exports.default = Deferred;

+ 4 - 8
package.json

@@ -1,10 +1,10 @@
 {
   "name": "deferred-lite",
-  "version": "0.1.1",
+  "version": "0.2.0-pre",
   "description": "Deferred pattern on top of Promise",
-  "main": "lib/node.js",
+  "type": "module",
+  "main": "src/node.js",
   "scripts": {
-    "build": "babel src --presets es2015 --out-dir lib",
     "test": "echo \"Error: no test specified\" && exit 1"
   },
   "repository": {
@@ -19,9 +19,5 @@
   "bugs": {
     "url": "https://lolg.it/herby/deferred-lite/issues"
   },
-  "homepage": "https://lolg.it/herby/deferred-lite#readme",
-  "devDependencies": {
-    "babel-cli": "^6.9.0",
-    "babel-preset-es2015": "^6.9.0"
-  }
+  "homepage": "https://lolg.it/herby/deferred-lite#readme"
 }