Drop extends helper (#254)
This commit is contained in:
parent
3c1836ab43
commit
f2de82a368
@ -7,7 +7,7 @@ import pluginList from "../data/plugins.json";
|
||||
import useBuiltInsEntryPlugin from "./use-built-ins-entry-plugin";
|
||||
import addUsedBuiltInsPlugin from "./use-built-ins-plugin";
|
||||
import getTargets from "./targets-parser";
|
||||
import { _extends, prettifyTargets, prettifyVersion, semverify } from "./utils";
|
||||
import { prettifyTargets, prettifyVersion, semverify } from "./utils";
|
||||
|
||||
/**
|
||||
* Determine if a transformation is required
|
||||
@ -79,7 +79,7 @@ const filterItem = (targets, exclusions, list, item) => {
|
||||
};
|
||||
|
||||
const getBuiltInTargets = targets => {
|
||||
const builtInTargets = _extends({}, targets);
|
||||
const builtInTargets = Object.assign({}, targets);
|
||||
if (builtInTargets.uglify != null) {
|
||||
delete builtInTargets.uglify;
|
||||
}
|
||||
|
||||
@ -1,19 +1,6 @@
|
||||
// @flow
|
||||
import semver from "semver";
|
||||
|
||||
export const _extends = Object.assign ||
|
||||
function(target) {
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
const source = arguments[i];
|
||||
for (const key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
|
||||
// Convert version to a semver value.
|
||||
// 2.5 -> 2.5.0; 1 -> 1.0.0;
|
||||
export const semverify = version => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user