docs(example-app): add cli crate app

This commit is contained in:
Leifer Mendez
2022-11-30 21:39:30 +01:00
parent 81b0aab850
commit df8282015d
9 changed files with 122 additions and 8 deletions

View File

@@ -0,0 +1,21 @@
const fs = require('fs-extra')
/**
* Copy files
*/
const copyFiles = async (from, to) => {
try {
await fs.copy(from, to)
console.log('success!')
} catch (err) {
console.error(err)
}
}
const copyBaseApp = async () => {
const BASEP_APP_PATH_FROM = `${process.cwd()}/starters/apps/base`
const BASEP_APP_PATH_TO = `${process.cwd()}/example-app-base`
await copyFiles(BASEP_APP_PATH_FROM, BASEP_APP_PATH_TO)
}
module.exports = { copyBaseApp }