a zip code crypto-currency system good for red ONLY

webpack.web.js 988B

123456789101112131415161718192021222324252627282930
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const Compiler = require("./Compiler");
  7. const WebEnvironmentPlugin = require("./web/WebEnvironmentPlugin");
  8. const WebpackOptionsApply = require("./WebpackOptionsApply");
  9. const WebpackOptionsDefaulter = require("./WebpackOptionsDefaulter");
  10. function webpack(options, callback) {
  11. new WebpackOptionsDefaulter().process(options);
  12. const compiler = new Compiler();
  13. compiler.options = options;
  14. compiler.options = new WebpackOptionsApply().process(options, compiler);
  15. new WebEnvironmentPlugin(options.inputFileSystem, options.outputFileSystem).apply(compiler);
  16. if(callback) {
  17. compiler.run(callback);
  18. }
  19. return compiler;
  20. }
  21. module.exports = webpack;
  22. webpack.WebpackOptionsDefaulter = WebpackOptionsDefaulter;
  23. webpack.WebpackOptionsApply = WebpackOptionsApply;
  24. webpack.Compiler = Compiler;
  25. webpack.WebEnvironmentPlugin = WebEnvironmentPlugin;