--- title: '自定義發佈擴展包使用指南' disqus: 'JL' --- # 自定義發佈擴展包使用指南 [TOC] ## 開發環境 :arrow_right: Node.js ## 安装&基本使用流程 1. 於擴展包資料夾執行: ```bash # 初始化安装 npm install ``` 完成後產生==node_modules==資料夾 2. 修改完相關程式 **\src\builder.ts**, 打包產生可讀取檔案 **\dist\builder.js** ```bash # 建構 npm run build ``` 完成後 **\dist** 會更新內容 3. 通過直接修改該文件夾內的代碼,編譯後,再 **擴展管理器** 中找到對應的構建插件,然後點擊 **重新載入** 圖標按鈕重啟插件即可。 ![重新載入](https://github.com/yanOO1497/creator-docs/raw/a4df3816c416a1d790a15acde3fc3986281588f9/zh/editor/publish/custom-project-build-template/enable-plugin.png) 4. 啟用後打開發佈面板,選擇任意平台,即可看到新參數。 ![plugin-template](https://github.com/yanOO1497/creator-docs/raw/a4df3816c416a1d790a15acde3fc3986281588f9/zh/editor/publish/custom-project-build-template/plugin-template.png) `From`[自定義構建流程](https://docs.cocos.com/creator/3.5/manual/zh/editor/publish/custom-build-plugin.html#%E6%9E%84%E5%BB%BA%E6%89%A9%E5%B1%95%E6%A8%A1%E6%9D%BF) 、 [建立擴展](https://docs.cocos.com/creator/manual/zh/editor/publish/build-guide.html) ###### tags: `JL` `RD`