File tree Expand file tree Collapse file tree 5 files changed +759
-71
lines changed Expand file tree Collapse file tree 5 files changed +759
-71
lines changed Original file line number Diff line number Diff line change 2727 ],
2828 "homepage" : " https://github.com/vieron/stylelint-webpack-plugin#readme" ,
2929 "peerDependencies" : {
30- "stylelint" : " ^7.7.0"
30+ "stylelint" : " ^7.7.0" ,
31+ "webpack" : " ^2 || ^2.2.0-rc.0 || ^2.1.0-beta.0 || ^1.13.2"
3132 },
3233 "dependencies" : {
3334 "arrify" : " ^1.0.1" ,
3435 "chalk" : " ^1.1.3" ,
3536 "object-assign" : " ^4.1.0" ,
36- "stylelint" : " ^7.7.0" ,
37- "webpack" : " ^1.13.2"
37+ "stylelint" : " ^7.7.0"
3838 },
3939 "devDependencies" : {
4040 "chai" : " ^3.5.0" ,
4141 "chai-as-promised" : " ^6.0.0" ,
4242 "coveralls" : " ^2.11.14" ,
4343 "memory-fs" : " ^0.3.0" ,
4444 "mocha" : " ^3.1.0" ,
45+ "npm-install-version" : " ^6.0.1" ,
4546 "nyc" : " ^8.3.1" ,
47+ "webpack" : " ^1.13.2" ,
4648 "xo" : " ^0.16.0"
4749 },
4850 "scripts" : {
4951 "pretest" : " xo" ,
50- "test" : " nyc mocha" ,
52+ "test:webpack1" : " WEBPACK_VERSION=1 nyc mocha" ,
53+ "test:webpack2" : " WEBPACK_VERSION=beta nyc mocha" ,
54+ "test" : " npm run test:webpack1 && npm run test:webpack2" ,
5155 "preversion" : " npm run test" ,
5256 "version" : " git add -A ."
5357 },
Original file line number Diff line number Diff line change 11'use strict' ;
22
3- var webpack = require ( 'webpack' ) ;
43var MemoryFileSystem = require ( 'memory-fs' ) ;
4+ var webpack = require ( './webpack' ) ;
55
66/**
77 * Basic in memory compiler, promisified
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ var niv = require ( 'npm-install-version' ) ;
4+
5+ var packageName = 'webpack@' + process . env . WEBPACK_VERSION ;
6+ niv . install ( packageName ) ;
7+
8+ module . exports = niv . require ( packageName ) ;
Original file line number Diff line number Diff line change 11'use strict' ;
22
33var assign = require ( 'object-assign' ) ;
4- var webpack = require ( 'webpack' ) ;
54
65var StyleLintPlugin = require ( '../' ) ;
76var pack = require ( './helpers/pack' ) ;
7+ var webpack = require ( './helpers/webpack' ) ;
88
99var configFilePath = getPath ( './.stylelintrc' ) ;
1010var baseConfig = {
11- debug : false ,
1211 output : {
1312 path : getPath ( 'output' )
1413 } ,
@@ -20,6 +19,16 @@ var baseConfig = {
2019 ]
2120} ;
2221
22+ if ( typeof webpack . LoaderOptionsPlugin === 'undefined' ) {
23+ baseConfig . debug = false ;
24+ } else {
25+ baseConfig . plugins . push (
26+ new webpack . LoaderOptionsPlugin ( {
27+ debug : false
28+ } )
29+ ) ;
30+ }
31+
2332describe ( 'stylelint-webpack-plugin' , function ( ) {
2433 it ( 'works with a simple file' , function ( ) {
2534 var config = {
You can’t perform that action at this time.
0 commit comments