-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathcopymailman.js
31 lines (27 loc) · 936 Bytes
/
copymailman.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
const fs = require("fs-extra");
var appRoot = require("app-root-path");
const picocolors = require("picocolors");
function handle() {
const path = `${appRoot.path}/resources/views`;
if (fs.existsSync(path)) {
console.log(picocolors.blue`➡️ ${path} already exists. Returning...`);
console.log(
picocolors.blue`➡️ To copy file, copy from ${picocolors.white(
process.cwd() + "/cli.js"
)} to ${picocolors.white(path)}`
);
return;
}
fs.copySync("./views", `${appRoot.path}/resources/views`, {
overwrite: true | false,
});
// (err) => {
// if (err) throw err;
// console.log(
// picocolors.green`🚀 Copying cli.js file to ${appRoot.path}/cli`,
// );
// console.log(
// picocolors.yellow`❓ To know more about on how to change default module and path in cli, go to https://github.com/squareboat/nest-console`,
// );
}
handle();