import {join} from 'path';
import tar from 'tar';

async function entry(): Promise<void> {
  await tar.extract({
    file: join(__dirname, '../pages/assets/fonts/Inter.tar'),
    cwd: join(__dirname, '../../public/fonts/')
  });
  await tar.extract({
    file: join(__dirname, '../pages/assets/fonts/Hasklig.tar'),
    cwd: join(__dirname, '../../public/fonts/')
  });
  await tar.extract({
    file: join(__dirname, '../pages/assets/favicons.tar'),
    cwd: join(__dirname, '../../public/')
  });
}

if (require.main === module) {
  void entry();
}
