Skip to content

Commit

Permalink
chore: use npm install version
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Lewis committed Jan 5, 2017
1 parent a13d6ca commit a9d6b2b
Show file tree
Hide file tree
Showing 6 changed files with 746 additions and 70 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@
"coveralls": "^2.11.14",
"memory-fs": "^0.3.0",
"mocha": "^3.1.0",
"npm-install-version": "^6.0.1",
"nyc": "^8.3.1",
"xo": "^0.16.0",
"webpack": "^1.13.2"
"webpack": "^1.13.2",
"xo": "^0.16.0"
},
"scripts": {
"pretest": "xo",
"test:webpack1": "npm i webpack@1 && nyc mocha",
"test:webpack2": "npm i webpack@beta && nyc mocha && npm i webpack@1",
"test:webpack1": "WEBPACK_VERSION=1 nyc mocha",
"test:webpack2": "WEBPACK_VERSION=beta nyc mocha",
"test": "npm run test:webpack1 && npm run test:webpack2",
"preversion": "npm run test",
"version": "git add -A ."
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/pack.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

var webpack = require('webpack');
var MemoryFileSystem = require('memory-fs');
var webpack = require('./webpack');

/**
* Basic in memory compiler, promisified
Expand Down
1 change: 1 addition & 0 deletions test/helpers/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ chai.use(require('chai-as-promised'));

// get path from the './test' directory
global.getPath = require('path').join.bind(this, __dirname, '..');

7 changes: 7 additions & 0 deletions test/helpers/webpack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

var niv = require('npm-install-version');

var packageName = 'webpack@' + process.env.WEBPACK_VERSION;
niv.install(packageName);
module.exports = niv.require(packageName);
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

var assign = require('object-assign');
var webpack = require('webpack');

var StyleLintPlugin = require('../');
var pack = require('./helpers/pack');
var webpack = require('./helpers/webpack');

var configFilePath = getPath('./.stylelintrc');
var baseConfig = {
Expand Down
Loading

0 comments on commit a9d6b2b

Please sign in to comment.