forked from humancto/CollabCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-static.js
More file actions
27 lines (21 loc) · 937 Bytes
/
Copy pathbuild-static.js
File metadata and controls
27 lines (21 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const fs = require('fs');
const path = require('path');
const root = __dirname;
const output = path.join(root, 'public');
const directories = ['docs', 'images', 'lib', 'scripts', 'styles'];
const files = ['index.html', 'app.html', 'reset-password.html'];
fs.rmSync(output, { recursive: true, force: true });
fs.mkdirSync(output, { recursive: true });
for (const directory of directories) {
fs.cpSync(path.join(root, directory), path.join(output, directory), {
recursive: true
});
}
for (const file of files) {
fs.copyFileSync(path.join(root, file), path.join(output, file));
}
// Make the interview application the default Vercel page while preserving
// the original promotional landing page at /landing.html.
fs.copyFileSync(path.join(root, 'index.html'), path.join(output, 'landing.html'));
fs.copyFileSync(path.join(root, 'app.html'), path.join(output, 'index.html'));
console.log('Static client copied to public/');