2023-05-24 20:02:25 +02:00
|
|
|
import path from 'path'
|
|
|
|
import fse from 'fs-extra'
|
2023-10-09 13:02:16 +02:00
|
|
|
import { collection } from '../../org/hooks/use-design.mjs'
|
2022-02-09 18:58:16 +01:00
|
|
|
|
2023-05-26 10:41:19 +02:00
|
|
|
const copyFromOrg = [
|
2023-09-16 10:33:49 +02:00
|
|
|
['account'],
|
|
|
|
['designs'],
|
2023-09-11 18:29:07 +02:00
|
|
|
['new', 'index.mjs'],
|
2023-10-09 13:02:16 +02:00
|
|
|
...collection.map((design) => ['new', `${design}.mjs`]),
|
2023-09-16 10:33:49 +02:00
|
|
|
['patterns'],
|
|
|
|
['sets'],
|
2023-09-11 18:29:07 +02:00
|
|
|
['signin'],
|
2023-09-16 10:33:49 +02:00
|
|
|
['signup'],
|
2023-05-26 10:41:19 +02:00
|
|
|
]
|
2023-05-24 20:02:25 +02:00
|
|
|
|
|
|
|
const copyOrgFiles = () => {
|
|
|
|
for (const folder of copyFromOrg) {
|
|
|
|
fse.copySync(
|
2023-09-11 18:29:07 +02:00
|
|
|
path.resolve('..', 'org', 'pages', ...folder),
|
|
|
|
path.resolve('..', 'lab', 'pages', ...folder),
|
2023-05-24 20:02:25 +02:00
|
|
|
{ overwrite: true }
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2023-05-18 13:56:08 +02:00
|
|
|
|
2023-02-05 19:58:25 +01:00
|
|
|
export const prebuildLab = async () => {
|
2023-05-24 20:02:25 +02:00
|
|
|
copyOrgFiles()
|
2022-02-09 18:58:16 +01:00
|
|
|
}
|