const{deleteResource:deleteResource,createDir:createDir,readDir:readDir,getWebAppPath:getWebAppPath}=require("./wm-utils"),util=require("util"),ncp=util.promisify(require("ncp").ncp),createAppSkeleton=async(e,t,a)=>{await deleteResource(t),await createDir(t,{recursive:!0}),await ncp(a+"/angular-app",t);const r=getWebAppPath(e);if((await readDir(`${r}/themes`)).length){const e=`${r}/themes/`;await ncp(e,`${t}/src/assets/themes`)}(await readDir(`${r}/extensions`)).length&&await ncp(`${r}/extensions`,`${t}/src/app/extensions`),await ncp(`${r}/app.css`,`${t}/src/assets/app.css`),await ncp(`${r}/resources`,`${t}/resources`),await ncp(`${a}/.npmrc`,`${t}/.npmrc`)};module.exports={createAppSkeleton:createAppSkeleton};