mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-18 19:49:16 +00:00
docs(example-app): add cli crate app
This commit is contained in:
21
packages/cli/create-app/index.js
Normal file
21
packages/cli/create-app/index.js
Normal 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 }
|
||||
Reference in New Issue
Block a user