Skip to content
This repository has been archived by the owner on Jul 30, 2023. It is now read-only.

Commit

Permalink
Add CSS modules check (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
ertrzyiks authored Oct 9, 2022
1 parent 56dd5b7 commit ecf54eb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ name: CI
on: [push]

jobs:
css-modules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- run: find apps/blog -type f -name "*.module.css" | node scripts/tailwind-progress.js >> $GITHUB_STEP_SUMMARY

test:
runs-on: ubuntu-latest

Expand Down
19 changes: 19 additions & 0 deletions scripts/tailwind-progress.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
let input = ''

const output = (content) => console.log(`${content}`)

process.stdin.on('data', (data) => {
input += data.toString()
})

process.stdin.on('end', () => {
const files = input.split('\n').filter((line) => Boolean(line))

output('# CSS Modules')
output('')
output(`Still ${files.length} modules to migrate\n`)

files.map((file) => {
output(` - ${file}`)
})
})

0 comments on commit ecf54eb

Please sign in to comment.