systemjs-plugin-babel
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -1,16 +0,17 @@ | ||
function defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
export default (function () { | ||
function defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
} | ||
export default function (Constructor, protoProps, staticProps) { | ||
if (protoProps) defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
}; | ||
return function (Constructor, protoProps, staticProps) { | ||
if (protoProps) defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
}; | ||
})(); |
@@ -1,40 +0,42 @@ | ||
var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; | ||
export default function createRawReactElement(type, props, key, children) { | ||
var defaultProps = type && type.defaultProps; | ||
var childrenLength = arguments.length - 3; | ||
export default (function () { | ||
var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; | ||
return function createRawReactElement(type, props, key, children) { | ||
var defaultProps = type && type.defaultProps; | ||
var childrenLength = arguments.length - 3; | ||
if (!props && childrenLength !== 0) { | ||
props = {}; | ||
} | ||
if (!props && childrenLength !== 0) { | ||
props = {}; | ||
} | ||
if (props && defaultProps) { | ||
for (var propName in defaultProps) { | ||
if (props[propName] === void 0) { | ||
props[propName] = defaultProps[propName]; | ||
if (props && defaultProps) { | ||
for (var propName in defaultProps) { | ||
if (props[propName] === void 0) { | ||
props[propName] = defaultProps[propName]; | ||
} | ||
} | ||
} else if (!props) { | ||
props = defaultProps || {}; | ||
} | ||
} else if (!props) { | ||
props = defaultProps || {}; | ||
} | ||
if (childrenLength === 1) { | ||
props.children = children; | ||
} else if (childrenLength > 1) { | ||
var childArray = Array(childrenLength); | ||
if (childrenLength === 1) { | ||
props.children = children; | ||
} else if (childrenLength > 1) { | ||
var childArray = Array(childrenLength); | ||
for (var i = 0; i < childrenLength; i++) { | ||
childArray[i] = arguments[i + 3]; | ||
for (var i = 0; i < childrenLength; i++) { | ||
childArray[i] = arguments[i + 3]; | ||
} | ||
props.children = childArray; | ||
} | ||
props.children = childArray; | ||
} | ||
return { | ||
$$typeof: REACT_ELEMENT_TYPE, | ||
type: type, | ||
key: key === undefined ? null : '' + key, | ||
ref: null, | ||
props: props, | ||
_owner: null | ||
return { | ||
$$typeof: REACT_ELEMENT_TYPE, | ||
type: type, | ||
key: key === undefined ? null : '' + key, | ||
ref: null, | ||
props: props, | ||
_owner: null | ||
}; | ||
}; | ||
}; | ||
})(); |
@@ -1,35 +0,37 @@ | ||
function sliceIterator(arr, i) { | ||
var _arr = []; | ||
var _n = true; | ||
var _d = false; | ||
var _e = undefined; | ||
export default (function () { | ||
function sliceIterator(arr, i) { | ||
var _arr = []; | ||
var _n = true; | ||
var _d = false; | ||
var _e = undefined; | ||
try { | ||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { | ||
_arr.push(_s.value); | ||
try { | ||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { | ||
_arr.push(_s.value); | ||
if (i && _arr.length === i) break; | ||
} | ||
} catch (err) { | ||
_d = true; | ||
_e = err; | ||
} finally { | ||
try { | ||
if (!_n && _i["return"]) _i["return"](); | ||
if (i && _arr.length === i) break; | ||
} | ||
} catch (err) { | ||
_d = true; | ||
_e = err; | ||
} finally { | ||
if (_d) throw _e; | ||
try { | ||
if (!_n && _i["return"]) _i["return"](); | ||
} finally { | ||
if (_d) throw _e; | ||
} | ||
} | ||
return _arr; | ||
} | ||
return _arr; | ||
} | ||
export default function (arr, i) { | ||
if (Array.isArray(arr)) { | ||
return arr; | ||
} else if (Symbol.iterator in Object(arr)) { | ||
return sliceIterator(arr, i); | ||
} else { | ||
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | ||
} | ||
}; | ||
return function (arr, i) { | ||
if (Array.isArray(arr)) { | ||
return arr; | ||
} else if (Symbol.iterator in Object(arr)) { | ||
return sliceIterator(arr, i); | ||
} else { | ||
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | ||
} | ||
}; | ||
})(); |
{ | ||
"name": "systemjs-plugin-babel", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"registry": "npm", | ||
@@ -5,0 +5,0 @@ "jspmPackage": true, |
@@ -49,2 +49,4 @@ var babel = require('systemjs-babel-build').babel; | ||
* presets: array of custom presets (objects or module name strings) | ||
* compact: as in Babel | ||
* comments: as in Babel | ||
* | ||
@@ -59,3 +61,5 @@ * babelOptions can be set at SystemJS.babelOptions OR on the metadata object for a given module | ||
stage2: true, | ||
stage1: false | ||
stage1: false, | ||
compact: 'auto', | ||
comments: true | ||
}; | ||
@@ -163,2 +167,4 @@ | ||
inputSourceMap: load.metadata.sourceMap, | ||
compact: babelOptions.compact, | ||
comments: babelOptions.comments, | ||
code: true, | ||
@@ -165,0 +171,0 @@ ast: true, |
@@ -1,2 +0,2 @@ | ||
let __regeneratorRuntime = (function(module) { | ||
export default (function(module) { | ||
/** | ||
@@ -671,2 +671,1 @@ * Copyright (c) 2014, Facebook, Inc. | ||
return module.exports; })({exports:{}}); | ||
export default __regeneratorRuntime; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2257796
46817
1