-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcopy_doc.js
More file actions
24 lines (19 loc) · 814 Bytes
/
copy_doc.js
File metadata and controls
24 lines (19 loc) · 814 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
const fs = require('fs');
const path = require('path');
const rimraf = require('rimraf');
const ncp = require('ncp').ncp;
const displayToolDocPath = require.resolve("@talentsoft-opensource/widget-display-tool/readme.md");
const hostApiPath = require.resolve("@talentsoft-opensource/integration-widget-contract/dist/doc/readme.md");
const destination = __dirname + '/doc';
rimraf.sync(destination);
fs.mkdirSync(destination);
fs.copyFile(displayToolDocPath, destination +'/display-tool.md', (err) => {
if (err) throw err;
console.log('display tool doc copied');
});
const hostApiDestination = destination + '/hostApi';
fs.mkdirSync(hostApiDestination)
ncp(path.dirname(hostApiPath), hostApiDestination, (err) => {
if (err) throw err;
console.log('host api doc copied');
});