Skip to content

Commit bc49802

Browse files
author
wangzongxu
committed
2 parents eca5a59 + b146549 commit bc49802

14 files changed

+3252
-2984
lines changed

Diff for: .github/workflows/nodejs.yml

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: mini-css-extract-plugin
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- next
8+
pull_request:
9+
branches:
10+
- master
11+
- next
12+
13+
jobs:
14+
lint:
15+
name: Lint - ${{ matrix.os }} - Node v${{ matrix.node-version }}
16+
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
20+
strategy:
21+
matrix:
22+
os: [ubuntu-latest]
23+
node-version: [12.x]
24+
25+
runs-on: ${{ matrix.os }}
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Use Node.js ${{ env.node-version }}
33+
uses: actions/setup-node@v1
34+
with:
35+
node-version: ${{ env.node-version }}
36+
37+
- name: Use latest NPM
38+
run: sudo npm i -g npm
39+
40+
- name: Install dependencies
41+
run: npm ci
42+
43+
- name: Lint
44+
run: npm run lint
45+
46+
# - name: Security audit
47+
# run: npm run security
48+
49+
- name: Check commit message
50+
uses: wagoid/commitlint-github-action@v1
51+
52+
test:
53+
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
54+
55+
strategy:
56+
matrix:
57+
os: [ubuntu-latest, windows-latest, macos-latest]
58+
# css-loader doesn't support node@6
59+
node-version: [8.x, 10.x, 12.x, 14.x]
60+
webpack-version: [latest, next]
61+
exclude:
62+
# Webpack 5 does not support node 6 and 8
63+
- node-version: 8.x
64+
webpack-version: next
65+
66+
runs-on: ${{ matrix.os }}
67+
68+
steps:
69+
- name: Setup Git
70+
if: matrix.os == 'windows-latest'
71+
run: git config --global core.autocrlf input
72+
73+
- uses: actions/checkout@v2
74+
75+
- name: Use Node.js ${{ matrix.node-version }}
76+
uses: actions/setup-node@v1
77+
with:
78+
node-version: ${{ matrix.node-version }}
79+
80+
- name: Use latest NPM on ubuntu/macos
81+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
82+
run: sudo npm i -g npm
83+
84+
- name: Use latest NPM on windows
85+
if: matrix.os == 'windows-latest'
86+
run: npm i -g npm
87+
88+
- name: Install dependencies
89+
run: npm i
90+
91+
- name: Install webpack ${{ matrix.webpack-version }}
92+
run: npm i webpack@${{ matrix.webpack-version }}
93+
94+
- name: Run tests for webpack version ${{ matrix.webpack-version }}
95+
run: npm run test:coverage -- --ci
96+
97+
- name: Submit coverage data to codecov
98+
uses: codecov/codecov-action@v1
99+
with:
100+
token: ${{ secrets.CODECOV_TOKEN }}

Diff for: README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ When inlining CSS `data-href` must be used.
402402

403403
### Extracting all CSS in a single file
404404

405-
Similar to what [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) does, the CSS can be extracted in one CSS file using `optimization.splitChunks.cacheGroups`.
405+
The CSS can be extracted in one CSS file using `optimization.splitChunks.cacheGroups`.
406406

407407
**webpack.config.js**
408408

@@ -601,11 +601,11 @@ Please take a moment to read our contributing guidelines if you haven't yet done
601601
[node-url]: https://nodejs.org
602602
[deps]: https://david-dm.org/webpack-contrib/mini-css-extract-plugin.svg
603603
[deps-url]: https://david-dm.org/webpack-contrib/mini-css-extract-plugin
604-
[tests]: https://dev.azure.com/webpack-contrib/mini-css-extract-plugin/_apis/build/status/webpack-contrib.mini-css-extract-plugin?branchName=master
605-
[tests-url]: https://dev.azure.com/webpack-contrib/mini-css-extract-plugin/_build/latest?definitionId=6&branchName=master
604+
[tests]: https://github.com/webpack-contrib/mini-css-extract-plugin/workflows/mini-css-extract-plugin/badge.svg
605+
[tests-url]: https://github.com/webpack-contrib/mini-css-extract-plugin/actions
606606
[cover]: https://codecov.io/gh/webpack-contrib/mini-css-extract-plugin/branch/master/graph/badge.svg
607607
[cover-url]: https://codecov.io/gh/webpack-contrib/mini-css-extract-plugin
608-
[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg
608+
[chat]: https://badges.gitter.im/webpack/webpack.svg
609609
[chat-url]: https://gitter.im/webpack/webpack
610610
[size]: https://packagephobia.now.sh/badge?p=mini-css-extract-plugin
611611
[size-url]: https://packagephobia.now.sh/result?p=mini-css-extract-plugin

Diff for: azure-pipelines.yml

-207
This file was deleted.

Diff for: jest.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ module.exports = {
22
testURL: 'http://localhost/',
33
transformIgnorePatterns: ['/node_modules/', '<rootDir>/dist/'],
44
watchPathIgnorePatterns: ['<rootDir>/test/js'],
5+
setupFilesAfterEnv: ['<rootDir>/setupTest.js'],
56
};

0 commit comments

Comments
 (0)