wip(new-design): Initial work to port to v3
This commit is contained in:
parent
a94f1cc3ef
commit
9c488f6bcb
22 changed files with 999 additions and 444 deletions
36
packages/new-design/scripts/filelist.mjs
Normal file
36
packages/new-design/scripts/filelist.mjs
Normal file
|
@ -0,0 +1,36 @@
|
|||
import rdir from 'recursive-readdir'
|
||||
import path from 'path'
|
||||
|
||||
const ignore = [
|
||||
'package.json',
|
||||
'node_modules',
|
||||
'.eslint',
|
||||
'.gitignore',
|
||||
'.md',
|
||||
'lab/components/header.js',
|
||||
'lab/components/help-us.js',
|
||||
'lab/components/search.js',
|
||||
'lab/components/footer.js',
|
||||
'shared/config/measurements.js',
|
||||
]
|
||||
|
||||
const getFiles = async (dir) => {
|
||||
const all = await rdir(path.resolve(dir))
|
||||
return all
|
||||
.filter((file) => {
|
||||
for (const skip of ignore) {
|
||||
if (file.includes(skip)) return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
.map((file) => file.split('/sites/').pop())
|
||||
}
|
||||
|
||||
const doIt = async () => {
|
||||
let files = []
|
||||
const shared = await getFiles('../../sites/shared')
|
||||
const lab = await getFiles('../../sites/lab/components')
|
||||
console.log(JSON.stringify([...shared, ...lab], null, 2))
|
||||
}
|
||||
|
||||
doIt()
|
Loading…
Add table
Add a link
Reference in a new issue