forked from EXT/VR180-Web-Player
17 lines
506 B
JavaScript
17 lines
506 B
JavaScript
import { copyFile, mkdir } from 'node:fs/promises';
|
|
import { dirname, join } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const rootDir = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
const styleCopies = [
|
|
{
|
|
from: join(rootDir, 'src', 'vr180player', 'styles', 'vr180-player.css'),
|
|
to: join(rootDir, 'vr180player', 'vr180-player.css')
|
|
}
|
|
];
|
|
|
|
await Promise.all(styleCopies.map(async ({ from, to }) => {
|
|
await mkdir(dirname(to), { recursive: true });
|
|
await copyFile(from, to);
|
|
}));
|