| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ var path = require("path"); | |||
| 3 | 3 | var fs = require("fs"); | |
| 4 | 4 | ||
| 5 | 5 | var NodeEnvironmentPlugin = require("../lib/node/NodeEnvironmentPlugin"); | |
| 6 | - var Compiler = require("../lib/Compiler"); | ||
| 6 | + var webpack = require("../"); | ||
| 7 | 7 | var WebpackOptionsApply = require("../lib/WebpackOptionsApply"); | |
| 8 | 8 | var WebpackOptionsDefaulter = require("../lib/WebpackOptionsDefaulter"); | |
| 9 | 9 | ||
@@ -22,9 +22,7 @@ describe("Compiler (caching)", function() { | |||
| 22 | 22 | writeFile: [], | |
| 23 | 23 | }; | |
| 24 | 24 | ||
| 25 | - var c = new Compiler(); | ||
| 26 | - new NodeEnvironmentPlugin().apply(c); | ||
| 27 | - c.options = new WebpackOptionsApply().process(options, c); | ||
| 25 | + var c = webpack(options); | ||
| 28 | 26 | var files = {}; | |
| 29 | 27 | c.outputFileSystem = { | |
| 30 | 28 | join: path.join.bind(path), | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ var should = require("should"); | |||
| 2 | 2 | var path = require("path"); | |
| 3 | 3 | ||
| 4 | 4 | var NodeEnvironmentPlugin = require("../lib/node/NodeEnvironmentPlugin"); | |
| 5 | - var Compiler = require("../lib/Compiler"); | ||
| 5 | + var webpack = require("../"); | ||
| 6 | 6 | var WebpackOptionsApply = require("../lib/WebpackOptionsApply"); | |
| 7 | 7 | var WebpackOptionsDefaulter = require("../lib/WebpackOptionsDefaulter"); | |
| 8 | 8 | ||
@@ -19,9 +19,7 @@ describe("Compiler", function() { | |||
| 19 | 19 | writeFile: [], | |
| 20 | 20 | }; | |
| 21 | 21 | ||
| 22 | - var c = new Compiler(); | ||
| 23 | - new NodeEnvironmentPlugin().apply(c); | ||
| 24 | - c.options = new WebpackOptionsApply().process(options, c); | ||
| 22 | + var c = webpack(options); | ||
| 25 | 23 | var files = {}; | |
| 26 | 24 | c.outputFileSystem = { | |
| 27 | 25 | join: path.join.bind(path), | |
| Back | FazBrowse Home | New Git URL |
0 commit comments