static build()

in lib/builders/JSBuilder.ts [11:30]


  static build(data: MaterialToolsData, filename: string): MaterialToolsOutput {

    let mainModule = this._buildMainModule(data.dependencies._mainModule);
    let raw = data.files.js.map(path => fse.readFileSync(path).toString()).join('\n');
    let source = [mainModule, '', raw].join('\n');
    let compressed = uglify.minify(source, {
      fromString: true,
      outSourceMap: filename,
      // Suppress "WARN: Output exceeds 32000 characters" warnings from UglifyJS 2.x
      // Those warnings can be safely ignored and shouldn't show up in the CLI.
      output: {'max_line_len': Number.MAX_VALUE }
    });

    return {
      source: source,
      compressed: compressed.code,
      map: compressed.map,
      license: data.license
    };
  }