mirror of
https://github.com/hugomods/docker.git
synced 2025-04-25 20:51:18 +03:00
Test PostCSS, PurgeCSS, Autoprefixer and RTLCSS (#61)
This commit is contained in:
parent
45bfb9a150
commit
959c70d805
4 changed files with 38 additions and 0 deletions
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
|
@ -236,6 +236,16 @@ jobs:
|
|||
steps.check.outputs.exists == 'false' &&
|
||||
contains(fromJson('["", "node-", "node-git-", "node-lts-", "exts-"]'), matrix.prefix)
|
||||
run: docker run --rm ${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:${{ matrix.version }}${{ matrix.prefix }}test node -v && npm version
|
||||
|
||||
- name: Check PostCSS, PurgeCSS, Autoprefixer and RTLCSS
|
||||
if: |
|
||||
steps.check.outputs.exists == 'false' &&
|
||||
contains(fromJson('["exts-"]'), matrix.prefix)
|
||||
run: >-
|
||||
docker run --rm
|
||||
-v $PWD/tests/postcss:/src
|
||||
${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:${{ matrix.version }}${{ matrix.prefix }}test
|
||||
postcss ./main.css
|
||||
|
||||
- name: Build and push
|
||||
if: steps.check.outputs.exists == 'false'
|
||||
|
|
7
tests/postcss/index.html
Normal file
7
tests/postcss/index.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<h1>Hello world!</h1>
|
||||
<p class="start-0">Foobar.</p>
|
||||
</body>
|
||||
</html>
|
8
tests/postcss/main.css
Normal file
8
tests/postcss/main.css
Normal file
|
@ -0,0 +1,8 @@
|
|||
h1,
|
||||
h2 {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.start-0 {
|
||||
left: 0;
|
||||
}
|
13
tests/postcss/postcss.config.js
Normal file
13
tests/postcss/postcss.config.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
const autoprefixer = require('/usr/local/lib/node_modules/autoprefixer')
|
||||
const rtlcss = require('/usr/local/lib/node_modules/rtlcss')
|
||||
const purgecss = require('/usr/local/lib/node_modules/@fullhuman/postcss-purgecss')
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
autoprefixer,
|
||||
purgecss({
|
||||
content: ['index.html']
|
||||
}),
|
||||
rtlcss
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue