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 {
|
export default class File {
|
||||||
constructor(opts = {}, pipeline) {
|
constructor(opts = {}, pipeline) {
|
||||||
this.transformerDependencies = {};
|
this.pipeline = pipeline;
|
||||||
|
|
||||||
this.dynamicImportTypes = {};
|
this.log = new Logger(this, opts.filename || "unknown");
|
||||||
this.dynamicImportIds = {};
|
this.opts = this.initOptions(opts);
|
||||||
this.dynamicImports = [];
|
|
||||||
|
|
||||||
this.declarations = {};
|
this.buildTransformers();
|
||||||
this.usedHelpers = {};
|
}
|
||||||
this.dynamicData = {};
|
|
||||||
this.data = {};
|
|
||||||
|
|
||||||
this.metadata = {
|
transformerDependencies = {};
|
||||||
|
dynamicImportTypes = {};
|
||||||
|
dynamicImportIds = {};
|
||||||
|
dynamicImports = [];
|
||||||
|
declarations = {};
|
||||||
|
usedHelpers = {};
|
||||||
|
dynamicData = {};
|
||||||
|
data = {};
|
||||||
|
ast = {};
|
||||||
|
|
||||||
|
metadata = {
|
||||||
modules: {
|
modules: {
|
||||||
imports: [],
|
imports: [],
|
||||||
exports: {
|
exports: {
|
||||||
@ -47,15 +54,7 @@ export default class File {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.pipeline = pipeline;
|
hub = new Hub(this);
|
||||||
this.log = new Logger(this, opts.filename || "unknown");
|
|
||||||
this.opts = this.initOptions(opts);
|
|
||||||
this.ast = {};
|
|
||||||
|
|
||||||
this.buildTransformers();
|
|
||||||
|
|
||||||
this.hub = new Hub(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [Please add a description.]
|
* [Please add a description.]
|
||||||
|
|||||||
@ -10,13 +10,11 @@ import File from "./file";
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export default class Pipeline {
|
export default class Pipeline {
|
||||||
constructor() {
|
transformers = object();
|
||||||
this.transformers = object();
|
namespaces = object();
|
||||||
this.namespaces = object();
|
deprecated = object();
|
||||||
this.deprecated = object();
|
aliases = object();
|
||||||
this.aliases = object();
|
filters = [];
|
||||||
this.filters = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [Please add a description.]
|
* [Please add a description.]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user