| Current Path : /var/www/homesaver/www/bitrix/js/ui/bbcode/ast-processor/build/plugin-web-to-mobile/ |
| Current File : /var/www/homesaver/www/bitrix/js/ui/bbcode/ast-processor/build/plugin-web-to-mobile/index.min.js |
const fs=require("fs");const path=require("path");module.exports=function e(n){this.name="web-to-mobile-plugin";const i=path.join(__dirname.split("modules")[0],"modules");const t=path.join(i,"mobile","install","mobileapp","mobile","extensions","bitrix");const s=path.join(t,...n.targetExtension.split("/"),"extension.js");return{name:"web-to-mobile-plugin",generateBundle(e){if(fs.existsSync(s)){fs.rmSync(s)}fs.writeFileSync(s,"");let i=fs.readFileSync(e.file,"ascii");if(Array.isArray(n.replacements)&&n.replacements.length>0){n.replacements.forEach((e=>{if(Array.isArray(e)&&e.length>1){i=i.replace(...e)}}))}if(typeof n.banner==="string"&&n.banner.length>0){i=`${n.banner}\n${i}`}fs.writeFileSync(s,i)}}};
//# sourceMappingURL=index.map.js