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