switch some classes to class propertie initialisers

This commit is contained in:
Sebastian McKenzie 2015-07-29 23:19:36 +01:00
parent a1bea6d073
commit aa3f9a16ee
2 changed files with 30 additions and 33 deletions

View File

@ -26,37 +26,36 @@ import * as t from "../../types";
export default class File {
constructor(opts = {}, pipeline) {
this.transformerDependencies = {};
this.dynamicImportTypes = {};
this.dynamicImportIds = {};
this.dynamicImports = [];
this.declarations = {};
this.usedHelpers = {};
this.dynamicData = {};
this.data = {};
this.metadata = {
modules: {
imports: [],
exports: {
exported: [],
specifiers: []
}
}
};
this.pipeline = pipeline;
this.log = new Logger(this, opts.filename || "unknown");
this.opts = this.initOptions(opts);
this.ast = {};
this.log = new Logger(this, opts.filename || "unknown");
this.opts = this.initOptions(opts);
this.buildTransformers();
this.hub = new Hub(this);
}
transformerDependencies = {};
dynamicImportTypes = {};
dynamicImportIds = {};
dynamicImports = [];
declarations = {};
usedHelpers = {};
dynamicData = {};
data = {};
ast = {};
metadata = {
modules: {
imports: [],
exports: {
exported: [],
specifiers: []
}
}
};
hub = new Hub(this);
/**
* [Please add a description.]
*/

View File

@ -10,13 +10,11 @@ import File from "./file";
*/
export default class Pipeline {
constructor() {
this.transformers = object();
this.namespaces = object();
this.deprecated = object();
this.aliases = object();
this.filters = [];
}
transformers = object();
namespaces = object();
deprecated = object();
aliases = object();
filters = [];
/**
* [Please add a description.]