@@ -16,37 +16,38 @@ const modules = (config) => {
1616 ? config . rules
1717 : config . loader
1818 ? [
19- {
20- test : config . loader . test || / \. t x t $ / ,
21- use : {
22- loader : path . resolve ( __dirname , '../../src' ) ,
23- options : config . loader . options || { } ,
19+ {
20+ test : config . loader . test || / \. t x t $ / ,
21+ use : {
22+ loader : path . resolve ( __dirname , '../../src' ) ,
23+ options : config . loader . options || { } ,
24+ } ,
2425 } ,
25- } ,
26- ]
26+ ]
2727 : [ ] ,
2828 } ;
2929} ;
3030
31- const plugins = config => ( [
32- new webpack . optimize . CommonsChunkPlugin ( {
33- names : [ 'runtime' ] ,
34- minChunks : Infinity ,
35- } ) ,
36- ] . concat ( config . plugins || [ ] ) ) ;
31+ const plugins = ( config ) =>
32+ [
33+ new webpack . optimize . CommonsChunkPlugin ( {
34+ names : [ 'runtime' ] ,
35+ minChunks : Infinity ,
36+ } ) ,
37+ ] . concat ( config . plugins || [ ] ) ;
3738
3839const output = ( config ) => {
3940 return {
4041 path : path . resolve (
4142 __dirname ,
42- `../outputs/${ config . output ? config . output : '' } ` ,
43+ `../outputs/${ config . output ? config . output : '' } `
4344 ) ,
4445 filename : '[name].js' ,
4546 chunkFilename : '[name].chunk.js' ,
4647 } ;
4748} ;
4849
49- module . exports = function ( fixture , config , options ) {
50+ module . exports = function ( fixture , config , options ) {
5051 config = {
5152 devtool : config . devtool || 'sourcemap' ,
5253 context : path . resolve ( __dirname , '..' , 'fixtures' ) ,
@@ -64,9 +65,11 @@ module.exports = function (fixture, config, options) {
6465
6566 if ( ! options . output ) compiler . outputFileSystem = new MemoryFS ( ) ;
6667
67- return new Promise ( ( resolve , reject ) => compiler . run ( ( err , stats ) => {
68- if ( err ) reject ( err ) ;
68+ return new Promise ( ( resolve , reject ) =>
69+ compiler . run ( ( err , stats ) => {
70+ if ( err ) reject ( err ) ;
6971
70- resolve ( stats ) ;
71- } ) ) ;
72+ resolve ( stats ) ;
73+ } )
74+ ) ;
7275} ;
0 commit comments