Skip to content

Commit 20bf1f2

Browse files
committed
use yarn instead of npm
1 parent eb26749 commit 20bf1f2

4 files changed

Lines changed: 11853 additions & 17219 deletions

File tree

copyfiles.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const { readdirSync, readFileSync, writeFileSync } = require('fs')
2+
3+
const COMPONENTS_DIR = 'src/components'
4+
5+
const getDirectories = (source) =>
6+
readdirSync(source, { withFileTypes: true })
7+
.filter((dirent) => dirent.isDirectory())
8+
.map((dirent) => dirent.name)
9+
10+
getDirectories(COMPONENTS_DIR).forEach((dir) => {
11+
const styleFile = readFileSync(`${COMPONENTS_DIR}/${dir}/style.module.css`, 'utf8')
12+
writeFileSync(`lib/cjs/${dir}/style.module.css`, styleFile)
13+
writeFileSync(`lib/esm/${dir}/style.module.css`, styleFile)
14+
})
15+
16+
console.log('copied all styles files')

0 commit comments

Comments
 (0)