constructor()

in packages/kotlin-webpack-plugin/plugin.js [34:60]


  constructor(options) {
    const logLevel = !options.verbose ? 'silent' : 'info';
    this.log = log({ name: pluginName, level: logLevel });

    const opts = Object.assign({}, DEFAULT_OPTIONS, options);
    this.prepareLibraries = this.prepareLibraries.bind(this);
    this.options = this.prepareLibraries(opts);

    this.outputPath = path.resolve(
      `${this.options.output}/${this.options.moduleName}.js`
    );
    this.firstCompilationError = null;

    this.compileIfKotlinFilesChanged =
      this.compileIfKotlinFilesChanged.bind(this);
    this.watchKotlinSources = this.watchKotlinSources.bind(this);
    this.compileIfFirstRun = this.compileIfFirstRun.bind(this);
    this.reportFirstCompilationError =
      this.reportFirstCompilationError.bind(this);
    this.optimizeDeadCode = this.optimizeDeadCode.bind(this);
    this.setPastDate = this.setPastDate.bind(this);

    this.startTime = Date.now();
    this.prevTimestamps = new Map();
    this.initialRun = true;
    this.sources = [].concat(this.options.src);
  }