{"id":22903802,"url":"https://github.com/betacatpro/web-project-build","last_synced_at":"2026-04-16T04:32:19.889Z","repository":{"id":164738713,"uuid":"640168135","full_name":"BetaCatPro/web-project-build","owner":"BetaCatPro","description":"前端工程化脚手架-用于项目构建和打包","archived":false,"fork":false,"pushed_at":"2023-05-19T09:29:08.000Z","size":204,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T22:42:29.579Z","etag":null,"topics":["cli","nodejs","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BetaCatPro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-13T07:51:35.000Z","updated_at":"2023-05-13T15:42:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8cd0a4f-1579-4280-8c65-0b7e1a59fae7","html_url":"https://github.com/BetaCatPro/web-project-build","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"52fb50fa79b90b8018b238cf035c392908ef2ffc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaCatPro%2Fweb-project-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaCatPro%2Fweb-project-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaCatPro%2Fweb-project-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaCatPro%2Fweb-project-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BetaCatPro","download_url":"https://codeload.github.com/BetaCatPro/web-project-build/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246604622,"owners_count":20804100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","nodejs","webpack"],"created_at":"2024-12-14T02:38:39.523Z","updated_at":"2026-04-16T04:32:19.853Z","avatar_url":"https://github.com/BetaCatPro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About The Project\n\n前端工程化脚手架-用于项目打包及构建等，提升研发效率，简化复杂流程。解决大前端团队底层工具链路的统一问题。\n\n```mermaid\ngraph LR\nA[大前端]--\u003e App\nApp--\u003eReactNative,Hybrid\nA--\u003e 小程序\n小程序--\u003e WeChat,Taro,Uni-app\nA--\u003e Web\nWeb--\u003e移动端\nWeb--\u003ePC端\nWeb--\u003e微前端\nA--\u003e组件库\n组件库--\u003eVue\n组件库--\u003eReact\n```\n\n脚手架提供:\n\n- 创建项目\n- 项目运行\n- 项目框架\n- 项目打包\n- 项目发布\n- ...\n\n`web-project-build` 项目负责启动及项目打包工作。\n\n## Getting Started\n\n### Installation\n\n1. Install NPM packages\n\n    ```sh\n    npm install web-project-build -g\n    ```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\n## Usage\n\n```sh\n    web-project-build start\n    web-project-build build\n```\n\n参数:\n\n- -c, --config: \u003c自定义 config 配置文件\u003e\n- --stop-build: 停止启动服务(用于 start 命令)\n- --custom-webpack-path: \u003c自定义 webpack 路径\u003e\n\n**config 文件** wpb-config.js\n\n```js\nexport default {\n    // 入口文件\n    entry: 'src/index.js',\n    // 自定义插件\n    plugins: function () {\n        return [\n            // 1. [插件路径，参数]\n            ['.ugins/cli-build-plugin.js', { a: 1, b: 2 }],\n            //2. 直接定义插件方法\n            function (api, options) {\n                console.log('this is anonymous plugin', options)\n            }\n        ]\n    },\n    // 自定义 Hooks 钩子\n    hooks: [\n        [\n            'start',\n            (context) =\u003e {\n                console.log('start', context)\n            }\n        ],\n        [\n            'plugin',\n            (context) =\u003e {\n                console.log('testHook', context.webpackConfig?.toConfig())\n            }\n        ]\n    ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetacatpro%2Fweb-project-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbetacatpro%2Fweb-project-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetacatpro%2Fweb-project-build/lists"}