const{deleteResource:deleteResource,createDir:createDir,readDir:readDir,getWebAppPath:getWebAppPath,isMobileProject:isMobileProject,codegenPath:codegenPath}=require("./wm-utils"),{getWmProjectProperties:getWmProjectProperties}=require("./project-meta"),util=require("util"),ncp=util.promisify(require("ncp").ncp),createAppSkeleton=async(e,t)=>{await deleteResource(t),await createDir(t,{recursive:!0}),await ncp(codegenPath+"/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`)};module.exports={createAppSkeleton:createAppSkeleton};