Skip to content

Commit

Permalink
make use of object-assign (#118)
Browse files Browse the repository at this point in the history
Delete assign from utils.js
  • Loading branch information
hiroppy authored and Andarist committed Apr 11, 2020
1 parent 58ad38a commit e3703e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
3 changes: 2 additions & 1 deletion packages/rollup-plugin-babel/src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { dirname } from 'path';
import { buildExternalHelpers, transform } from 'babel-core';
import { createFilter } from 'rollup-pluginutils';
import assign from 'object-assign';
import preflightCheck from './preflightCheck.js';
import { assign, warnOnce } from './utils.js';
import { warnOnce } from './utils.js';
import { RUNTIME, BUNDLED, HELPERS } from './constants.js';

const keywordHelpers = [ 'typeof', 'extends', 'instanceof' ];
Expand Down
2 changes: 1 addition & 1 deletion packages/rollup-plugin-babel/src/preflightCheck.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { join } from 'path';
import { assign } from './utils.js';
import assign from 'object-assign';
import { transform } from 'babel-core';
import { INLINE, RUNTIME, BUNDLED } from './constants.js';
import classes from 'babel-plugin-transform-es2015-classes';
Expand Down
7 changes: 0 additions & 7 deletions packages/rollup-plugin-babel/src/utils.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
export function assign ( target, source ) {
Object.keys( source ).forEach( key => {
target[ key ] = source[ key ];
});
return target;
}

let warned = {};
export function warnOnce ( warn, msg ) {
if ( warned[ msg ] ) return;
Expand Down

0 comments on commit e3703e8

Please sign in to comment.