import fg from 'fast-glob'
import fs from 'fs-extra'
import { join, resolve } from 'path'

const packageRoot = resolve(__dirname, '../packages/theme')
const packageDist = resolve(packageRoot, 'dist')
const FILES_COPY = ['*.scss']

async function copyFiles() {
  const files = await fg(FILES_COPY, { cwd: packageRoot })
  for (const file of files) {
    await fs.copy(join(packageRoot, file), join(packageDist, file), { recursive: true })
  }
}

copyFiles()
