Browse Source

Merge pull request #8 from eventualbuddha/cleanup

Remove unused imports and use one that should be used.
contingency-plan
Rich Harris 10 years ago
parent
commit
94019461c2
  1. 7
      src/Module.js

7
src/Module.js

@ -1,11 +1,10 @@
import { relative } from 'path';
import { Promise } from 'sander'; import { Promise } from 'sander';
import { parse } from 'acorn'; import { parse } from 'acorn';
import MagicString from 'magic-string'; import MagicString from 'magic-string';
import Statement from './Statement'; import Statement from './Statement';
import walk from './ast/walk'; import walk from './ast/walk';
import analyse from './ast/analyse'; import analyse from './ast/analyse';
import { blank, has, keys } from './utils/object'; import { has, keys } from './utils/object';
import { sequence } from './utils/promise'; import { sequence } from './utils/promise';
import { isImportDeclaration, isExportDeclaration } from './utils/map-helpers'; import { isImportDeclaration, isExportDeclaration } from './utils/map-helpers';
import getLocation from './utils/getLocation'; import getLocation from './utils/getLocation';
@ -165,11 +164,11 @@ export default class Module {
this.modifications = {}; this.modifications = {};
this.statements.forEach( statement => { this.statements.forEach( statement => {
Object.keys( statement.defines ).forEach( name => { keys( statement.defines ).forEach( name => {
this.definitions[ name ] = statement; this.definitions[ name ] = statement;
}); });
Object.keys( statement.modifies ).forEach( name => { keys( statement.modifies ).forEach( name => {
if ( !has( this.modifications, name ) ) { if ( !has( this.modifications, name ) ) {
this.modifications[ name ] = []; this.modifications[ name ] = [];
} }

Loading…
Cancel
Save