-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
Run tests for diffirent webpack configs
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
{ | ||
"presets": [ | ||
[ "@babel/preset-env", { | ||
"corejs": 3, | ||
"targets": { | ||
"node": "8" | ||
"node": "8.0.0" | ||
}, | ||
"loose": true, | ||
"useBuiltIns": "entry" | ||
"useBuiltIns": "usage" | ||
} ] | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ yarn.lock | |
|
||
.eslintcache | ||
lib/**.js | ||
test/_out | ||
test/**/_out |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ node_js: | |
- "13" | ||
- "node" | ||
|
||
before_script: npm run test-prepare | ||
script: npm test | ||
|
||
branches: | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.c .d,.local-a.c .d,.local-c .local-d{color:#fff} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.local-a.c .d { color: #fff; } | ||
.c .d { color: white; } | ||
.local-c .local-d { color: #ffffff; } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.local-a.c .d { color: #fff; } | ||
.c .d { color: white; } | ||
.local-c .local-d { color: #ffffff; } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.c .d,.local-a.c .d,.local-c .local-d{color:#fff} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.local-a,.local-b,.local-c{color:#fff} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.local-a,.local-b,.local-c{color:#fff} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.local-a,.local-b,.local-c{color:#fff} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.local-a,.local-b,.local-c{color:#fff} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.local-a.c .d{color:#fff} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.local-a.c .d{color:#fff} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@import url('import.css'); | ||
.a { color: white; } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const runIntegrations = require('../lib/integrations.js'); | ||
|
||
describe('Integrations with webpack 2', function() { | ||
runIntegrations.call(this, __dirname, '2'); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"dependencies": { | ||
"css-loader": "^0.28.11", | ||
"extract-text-webpack-plugin": "^2.1.0", | ||
"webpack": "^2.7.0" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const runIntegrations = require('../lib/integrations.js'); | ||
|
||
describe('Integrations with webpack 4', function() { | ||
runIntegrations.call(this, __dirname, '4'); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"dependencies": { | ||
"css-loader": "^5.2.0", | ||
"mini-css-extract-plugin": "^1.4.0", | ||
"webpack": "^4.46.0" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const DefinePlugin = require('webpack').DefinePlugin; | ||
const ExtractTextPlugin = require('mini-css-extract-plugin'); | ||
|
||
const styleExtractPlugin = new ExtractTextPlugin({ | ||
filename: '[name].css', | ||
}); | ||
|
||
module.exports = function (options) { | ||
return { | ||
mode: 'none', | ||
entry: { | ||
test: './index.js' | ||
}, | ||
cache: false, | ||
performance: false, | ||
context: options.testDirectory, | ||
output: { | ||
filename: '[name].js', | ||
path: options.outputDirectory, | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
use: [ | ||
ExtractTextPlugin.loader, | ||
{ | ||
loader: options.basePath + '/node_modules/css-loader', | ||
options: { | ||
modules: { | ||
localIdentName: 'local-[local]', | ||
}, | ||
sourceMap: true | ||
} | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new DefinePlugin({ | ||
'process.env.NODE_ENV': '"production"', | ||
}), | ||
styleExtractPlugin, | ||
], | ||
}; | ||
}; |