switch some classes to class propertie initialisers
This commit is contained in:
parent
a1bea6d073
commit
aa3f9a16ee
@ -26,18 +26,25 @@ import * as t from "../../types";
|
||||
|
||||
export default class File {
|
||||
constructor(opts = {}, pipeline) {
|
||||
this.transformerDependencies = {};
|
||||
this.pipeline = pipeline;
|
||||
|
||||
this.dynamicImportTypes = {};
|
||||
this.dynamicImportIds = {};
|
||||
this.dynamicImports = [];
|
||||
this.log = new Logger(this, opts.filename || "unknown");
|
||||
this.opts = this.initOptions(opts);
|
||||
|
||||
this.declarations = {};
|
||||
this.usedHelpers = {};
|
||||
this.dynamicData = {};
|
||||
this.data = {};
|
||||
this.buildTransformers();
|
||||
}
|
||||
|
||||
this.metadata = {
|
||||
transformerDependencies = {};
|
||||
dynamicImportTypes = {};
|
||||
dynamicImportIds = {};
|
||||
dynamicImports = [];
|
||||
declarations = {};
|
||||
usedHelpers = {};
|
||||
dynamicData = {};
|
||||
data = {};
|
||||
ast = {};
|
||||
|
||||
metadata = {
|
||||
modules: {
|
||||
imports: [],
|
||||
exports: {
|
||||
@ -47,15 +54,7 @@ export default class File {
|
||||
}
|
||||
};
|
||||
|
||||
this.pipeline = pipeline;
|
||||
this.log = new Logger(this, opts.filename || "unknown");
|
||||
this.opts = this.initOptions(opts);
|
||||
this.ast = {};
|
||||
|
||||
this.buildTransformers();
|
||||
|
||||
this.hub = new Hub(this);
|
||||
}
|
||||
hub = new Hub(this);
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
|
||||
@ -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.]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user