-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.js
44 lines (41 loc) · 1.01 KB
/
init.js
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const fs = require('fs');
const path = require('path');
function init(file) {
if (fs.existsSync(path.resolve(__dirname, file.dist))) fs.unlinkSync(path.resolve(__dirname, file.dist));
fs.createReadStream(path.resolve(__dirname, file.src)).pipe(fs.createWriteStream(path.resolve(__dirname, file.dist)));
}
files = [
{
src: './README.md',
dist: './server/README.md',
},
{
src: './LICENSE',
dist: './server/LICENSE',
},
{
src: './.docsify/_sidebar.md',
dist: './server/_sidebar.md',
},
{
src: './.docsify/index.html',
dist: './server/index.html',
},
{
src: './config/README.md',
dist: './server/config.md',
},
{
src: './docs/windows-applications.md',
dist: './server/windows-applications.md',
},
{
src: './docs/windows-system-reinstallation-applications.md',
dist: './server/windows-system-reinstallation-applications.md',
},
{
src: './docs/windows-tools.md',
dist: './server/windows-tools.md',
},
];
files.forEach((file) => init(file));