16 lines
426 B
JavaScript
16 lines
426 B
JavaScript
|
|
const fs = require('fs');
|
||
|
|
const path = require('path');
|
||
|
|
|
||
|
|
const ROOT = path.join(__dirname, '..');
|
||
|
|
const PAGES = path.join(ROOT, 'source', 'pages');
|
||
|
|
const DEST = path.join(ROOT, 'build', 'app');
|
||
|
|
|
||
|
|
fs.mkdirSync(DEST, { recursive: true });
|
||
|
|
|
||
|
|
for (const file of fs.readdirSync(PAGES)) {
|
||
|
|
if (file.endsWith('.html')) {
|
||
|
|
fs.copyFileSync(path.join(PAGES, file), path.join(DEST, file));
|
||
|
|
console.log(`copied ${file}`);
|
||
|
|
}
|
||
|
|
}
|