Skip to content

Commit c6e7629

Browse files
committed
chore: add header to theme.css
1 parent 8bb1426 commit c6e7629

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

.github/workflows/build-and-bump.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [main]
66
paths:
77
- source/**
8-
- .github/workflows/build-and-bump.yml
8+
- .github/workflows/build-and-bump.yml # this file itself
99
workflow_dispatch:
1010

1111
permissions:
@@ -35,17 +35,26 @@ jobs:
3535
# Due to globbing, the source files are inserted in alphabetical order.
3636
# To keep things predictable, they are simply number in the order they
3737
# should be included in.
38-
cat ./source/**/*.css > ./theme.css
38+
cat ./source/**/*.css > ./source.css
3939
4040
# minification & syntax-lowering https://lightningcss.dev/transpilation.html
4141
npm install
4242
export BROWSERSLIST="chrome 108" # lowers syntax to before css-nesting https://caniuse.com/css-nesting
4343
npx lightningcss --minify --browserslist \
44-
--output-file="./theme.css" -- "./theme.css" || exit 1
44+
--output-file="./temp.css" -- "./temp.css" || exit 1
4545
46-
# append style-settings (last, so not removed by minification)
47-
cat <(echo && echo "/* @settings") ./source/style-settings.yaml <(echo "*/") \
48-
>> ./theme.css
46+
# merge header, css code, and style settings into `theme.css`
47+
echo "/*" >> ./theme.css
48+
cat ./source/header.txt >> ./theme.css
49+
echo "*/" >> ./theme.css
50+
51+
cat ./temp.css >> ./theme.css
52+
rm temp.css
53+
54+
echo "" >> ./theme.css
55+
echo "/* @settings" >> ./theme.css
56+
cat ./source/style-settings.yaml >> theme.css
57+
echo "*/" >> theme.css
4958
5059
- name: check for unsupported features
5160
run: |

source/header.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SHIMMERING FOCUS
2+
by Chris Grieser aka @pseudometa
3+
4+
MIT License
5+
6+
The unminified original code can be found in the theme's repository: https://github.com/chrisgrieser/shimmering-focus/

0 commit comments

Comments
 (0)