Skip to content

Instantly share code, notes, and snippets.

@glasserc
Last active October 16, 2020 15:51
Show Gist options
  • Save glasserc/be6ffc197fc961bd7f0ea3e9fee3cfd5 to your computer and use it in GitHub Desktop.
Save glasserc/be6ffc197fc961bd7f0ea3e9fee3cfd5 to your computer and use it in GitHub Desktop.
Trying to figure out transform-builtin-extend, transform-runtime, etc.
{
"env": {
"development": {
"plugins": [
["transform-builtin-extend", {
"globals": ["Error"]
}],
"transform-runtime",
"transform-es2015-classes",
"transform-es2015-modules-commonjs"
]
}
}
}
"use strict";
var _create = require("babel-runtime/core-js/object/create");
var _create2 = _interopRequireDefault(_create);
var _setPrototypeOf = require("babel-runtime/core-js/object/set-prototype-of");
var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
var _from = require("babel-runtime/core-js/array/from");
var _from2 = _interopRequireDefault(_from);
var _construct = require("babel-runtime/core-js/reflect/construct");
var _construct2 = _interopRequireDefault(_construct);
var _getPrototypeOf = require("babel-runtime/core-js/object/get-prototype-of");
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn");
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = require("babel-runtime/helpers/inherits");
var _inherits3 = _interopRequireDefault(_inherits2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extendableBuiltin3(cls) {
function ExtendableBuiltin() {
var instance = _Reflect$construct(cls, _Array$from(arguments));
_Object$setPrototypeOf(instance, _Object$getPrototypeOf(this));
return instance;
}
ExtendableBuiltin.prototype = _Object$create(cls.prototype, {
constructor: {
value: cls,
enumerable: false,
writable: true,
configurable: true
}
});
if (_Object$setPrototypeOf) {
_Object$setPrototypeOf(ExtendableBuiltin, cls);
} else {
ExtendableBuiltin.__proto__ = cls;
}
return ExtendableBuiltin;
}
function _extendableBuiltin(cls) {
function ExtendableBuiltin() {
var instance = (0, _construct2.default)(cls, (0, _from2.default)(arguments));
(0, _setPrototypeOf2.default)(instance, (0, _getPrototypeOf2.default)(this));
return instance;
}
ExtendableBuiltin.prototype = (0, _create2.default)(cls.prototype, {
constructor: {
value: cls,
enumerable: false,
writable: true,
configurable: true
}
});
if (_setPrototypeOf2.default) {
(0, _setPrototypeOf2.default)(ExtendableBuiltin, cls);
} else {
ExtendableBuiltin.__proto__ = cls;
}
return ExtendableBuiltin;
}
var Error1 = function (_extendableBuiltin2) {
(0, _inherits3.default)(Error1, _extendableBuiltin2);
function Error1() {
(0, _classCallCheck3.default)(this, Error1);
return (0, _possibleConstructorReturn3.default)(this, (Error1.__proto__ || (0, _getPrototypeOf2.default)(Error1)).apply(this, arguments));
}
return Error1;
}(_extendableBuiltin(Error));
var Error2 = function (_extendableBuiltin4) {
(0, _inherits3.default)(Error2, _extendableBuiltin4);
function Error2() {
(0, _classCallCheck3.default)(this, Error2);
return (0, _possibleConstructorReturn3.default)(this, (Error2.__proto__ || (0, _getPrototypeOf2.default)(Error2)).apply(this, arguments));
}
return Error2;
}(_extendableBuiltin3(Error));
class Error1 extends Error {}
class Error2 extends Error {}
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ ├─┬ [email protected]
│ │ │ │ │ │ └─┬ [email protected]
│ │ │ │ │ │ ├── [email protected]
│ │ │ │ │ │ ├── [email protected]
│ │ │ │ │ │ ├─┬ [email protected]
│ │ │ │ │ │ │ ├─┬ [email protected]
│ │ │ │ │ │ │ │ └── [email protected]
│ │ │ │ │ │ │ └── [email protected]
│ │ │ │ │ │ └── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ ├─┬ [email protected]
│ │ │ │ │ │ └── [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ └─┬ [email protected]
│ │ │ │ └─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── UNMET OPTIONAL DEPENDENCY fsevents@^1.0.0
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ └── [email protected]
└─┬ [email protected]
├── [email protected]
└── [email protected]
{
"name": "ethan-test-core-js",
"version": "0.0.1",
"description": "Ethan is trying to understand how these transforms work",
"main": "lib/index.js",
"scripts": {
"build": "babel -d lib/ index.js"
},
"dependencies": {
"babel-runtime": "^6.22.0"
},
"devDependencies": {
"babel-cli": "^6.22.2",
"babel-core": "^6.26.0",
"babel-plugin-transform-builtin-extend": "^1.1.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1"
},
"engines": {
"node": ">=6"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment