{"id":13457759,"url":"https://github.com/easy-team/easywebpack-cli","last_synced_at":"2025-04-06T09:07:03.792Z","repository":{"id":57110378,"uuid":"96725641","full_name":"easy-team/easywebpack-cli","owner":"easy-team","description":"A Powerful Cross-platform Webpack CLI Tool","archived":false,"fork":false,"pushed_at":"2024-08-25T06:09:35.000Z","size":933,"stargazers_count":122,"open_issues_count":5,"forks_count":28,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-29T00:06:19.085Z","etag":null,"topics":["cli","easywebpack-cli","easywebpack-server","react","react-boilerplate","react-ssr","server-side-react","server-side-rendering","server-side-vue","vue","vue-boilerplate","vue-ssr","webpack","webpack-cli","weex","weex-building","weex-native","weex-vue","weex-web"],"latest_commit_sha":null,"homepage":"https://easyjs.cn/easywebpack","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/easy-team.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2017-07-10T01:59:09.000Z","updated_at":"2024-08-25T06:09:38.000Z","dependencies_parsed_at":"2024-11-02T15:31:20.195Z","dependency_job_id":null,"html_url":"https://github.com/easy-team/easywebpack-cli","commit_stats":{"total_commits":218,"total_committers":6,"mean_commits":"36.333333333333336","dds":0.2844036697247706,"last_synced_commit":"3e634e0b304b4fe8e6edd9bda2953e4368f9184d"},"previous_names":["hubcarl/easywebpack-cli"],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easy-team%2Feasywebpack-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easy-team%2Feasywebpack-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easy-team%2Feasywebpack-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easy-team%2Feasywebpack-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/easy-team","download_url":"https://codeload.github.com/easy-team/easywebpack-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457799,"owners_count":20941906,"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","easywebpack-cli","easywebpack-server","react","react-boilerplate","react-ssr","server-side-react","server-side-rendering","server-side-vue","vue","vue-boilerplate","vue-ssr","webpack","webpack-cli","weex","weex-building","weex-native","weex-vue","weex-web"],"created_at":"2024-07-31T09:00:35.793Z","updated_at":"2025-04-06T09:07:03.775Z","avatar_url":"https://github.com/easy-team.png","language":"JavaScript","funding_links":[],"categories":["easywebpack-cli","JavaScript"],"sub_categories":[],"readme":"# easywebpack-cli\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.yuque.com/easy-team\" target=\"_blank\"\u003e\n    \u003cimg width=\"200\" height=\"200\" src=\"/doc/easywebpack-logo.png\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e  \n\u003cbr\u003e\n \n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![David deps][david-image]][david-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/easywebpack-cli.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/easywebpack-cli\n[travis-image]: https://img.shields.io/travis/easy-team/easywebpack-cli.svg?style=flat-square\n[travis-url]: https://travis-ci.org/easy-team/easywebpack-cli\n[codecov-image]: https://codecov.io/gh/easy-team/easywebpack-cli/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/easy-team/easywebpack-cli\n[david-image]: https://img.shields.io/david/easy-team/easywebpack-cli.svg?style=flat-square\n[david-url]: https://david-dm.org/easy-team/easywebpack-cli\n[download-image]: https://img.shields.io/npm/dm/easywebpack-cli.svg?style=flat-square\n[download-url]: https://npmjs.org/package/easywebpack-cli\n\nA Powerful Cross-platform Webpack CLI Tool\n\n## Installation\n\n- easywebpack-cli@5 -\u003e easywebpack@5 (\u003e=Node 8 + Babel 7)\n\n```bash\nnpm i easywebpack-cli -g\n```\n\n- @easy-team/easywebpack-cli@4 -\u003e @easy-team/easywebpack@4 (\u003e=Node 6 + Babel 7)\n\n```bash\nnpm i @easy-team/easywebpack-cli -g\n```\n\n- easywebpack-cli@4 -\u003e easywebpack@4 (\u003e=Node 6 + Babel 6)\n\n```bash\nnpm i easywebpack-cli -g\n```\n\n## Features\n\n- ✔︎ Provide easywebpack and webapck development and build capabilities\n- ✔︎ Provide multiple types of project initialization, such as React, Vue, Egg projects\n- ✔︎ Provide multiple types of project builds, such as React, Vue, Egg, Weex projects\n- ✔︎ Provide webpack basic development and build capabilities, such as dev server, hot-reload, typescript, dll\n- ✔︎ Enhance Webpack-based development and build capabilities, such as build speed, build size capabilities\n- ✔︎ Provide [easywebpack](https://github.com/easy-team/easywebpack) solution development and build capabilities\n- ✔︎ Built-in normal development commands, such easy clean, easy open, easy kill, easy server\n\n## Documents\n\n- [Webpack Solution](https://github.com/easy-team/easywebpack)\n- [Vue Single Application](https://github.com/easy-team/easywebpack-vue)\n- [React Single Application](https://github.com/easy-team/easywebpack-react)\n- [Vue Server Side Render](https://www.yuque.com/easy-team/ves)\n- [React Server Side Render](https://www.yuque.com/easy-team/res)\n- [Weex Application](https://github.com/easy-team/easywebpack-weex)\n\n## Command\n\nSupport easywebpack and webpack modes，default easywebpack mode, you can specify the wepback build mode by `--webpack`. Default read `${root}/webpack.config.js` webpack config file.\n\n- easywebpack mode: use easywebpack webpack config\n- Webpack mode: use native webpack config\n\n```bash\neasy -h\n```\n\nUsage: easy [command] [options]\n\n  Options:\n\n    -v, --version          output the version number\n    -f, --filename [path]  webpack config file path\n    -p, --port [port]      webpack server port\n    -s, --size [option]    webpack build size analyzer tool, support size: analyzer and stats, default analyzer\n    --dll                  only webpack dll config\n    --web                  only webpack web config\n    --node                 only webpack node config\n    --speed                stat webpack build speed\n    --devtool [devtool]    webpack devtool config\n    -h, --help             output usage information\n\n  Commands:\n\n    init [options]         init webpack config or boilerplate for Vue/React/Weex\n    install [options]      dynamic install easywebpack missing npm module\n    upgrade [options]      upgrade project package to latest version\n    print [options] [env]  print webpack config, support print by env or config node key\n    dll [env]              webpack dll build\n    build [options] [env]  webpack building\n    server [options]       static file web http server\n    dev [env]              start webpack dev server for develoment mode\n    start [env]            start webpack dev server for develoment mode\n    zip [options]          archive files to zip file\n    tar [options]          archive files to tar file\n    deploy                 upload file to deplay space\n    upgrade                upgrade webpack and npm package\n    clean [dir]            webpack cache dir clean, if dir == \"all\", will clean cache dir and build dir\n    open [dir]             open webpack cache dir\n    kill [port]            kill port process, default will kill 7001, 9000, 9001\n\n\n### Project Initialization\n\n- easy init\n\n\u003e step one:\n\n![step one](/doc/easy-init-step-one.png)\n\n\u003e step two:\n\n![step two](/doc/easy-init-step-two.png)\n\n### Add Component/Config\n\n![easy add](/doc/easy-add.png)\n\n#### 从列表中选择指定模板\n\n```bash\neasy add \n```\n\n#### 从列表中选择 React 相关模板\n\n```bash\neasy add --template react\n```\n\n#### 直接初始化模板\n\n```bash\neasy add --template react-component\n```\n\n#### 自定义模板路径/文件名\n\n```bash\neasy add --template react-component --dist src/components --output Test.jsx\n```\n\n### Project Development\n\n#### easywebpack\n\n- easy dev\n\n- easy dev -f build/webpack.config.js\n\n#### webpack\n\n- easy dev --webpack\n\n- easy dev -f build/webpack.config.js --webpack\n\n### Project Building\n\n#### easywebpack \n\n- easy build prod\n\n- easy build -f build/webpack.config.js\n\n#### webpack\n\n- easy build -f build/webpack.config.js --webpack\n\n### Upgrade\n\n- upgrade webpack3 to webpack4\n\n```bash\neasy upgrade\n```\n\n- upgrade egg project to webpack4\n\n```bash\neasy upgrade --egg\n```\n\n- upgrade babel 6 to babel 7\n\n```bash\neasy upgrade --babel\n```\n\n### Puppeteer Html Prerender\n\n```bash\neasy puppeteer --url http://49.233.172.37:7001/csr\n```\n\n### Clean Cache\n\n```bash\neasy clean\n```\n\n### Open Directory\n\n```bash\neasy open\n```\n\n### Kill Port\n\n```bash\neasy kill 7001\neasy kill 7001,9000,9001\n```\n\n### Webpack Build Size\n\n![easy-build-s](/doc/easy-build-s-cmd.png)\n\n\u003e https://www.yuque.com/easy-team/easywebpack/pdwchd\n\n- webpack-bundle-analyzer\n\n```bash\neasy build -s \n```\n\n- stats-webpack-plugin\n\n```bash\neasy build -s stats\n```\n\n### Webpack Build Speed\n\nUse the plugin `speed-measure-webpack-plugin` for build speed analysis and count the time spent on each loader and plugin\n\n```bash\neasy build --speed\n```\n\n### Start Web HTTP Server\n\nUse the plugin `node-http-server` for local directory compilation access, automatically find HTML files\n\n![easy server](/doc/easy-server-cmd.png)\n\n- serve current dir\n\n```bash\neasy server\n```\n\n- serve specify port and directory\n\n```bash\neasy server -p 8888 -d dist\n```\n\n### Print Webpack Config Info\n\n```bash\neasy print -h\n```\n\n  Usage: print [env] [options]\n\n    print webpack config, support print by env or config node key\n\n\n  Options:\n\n    -k, --key [name]  print webpack config info by config key name, example: [module/module.rules/plugins] and so on\n    -h, --help        output usage information\n\n- easy print -k module\n\n- easy print dev -k entry\n\n- easy print test -k module.rules\n\n- easy print prod -k module.rules[0]\n\n- easy print -k plugins\n\n- easy print -k plugins[0]\n\n- easy print -k output\n\n- easy print -k resolve\n\n\n## Extend Webpack CLI \n\n- [res-cli](https://github.com/easy-team/res-cli) Res Node Web Framework Command CLI\n\n- [ves-cli](https://github.com/easy-team/res-cli) Ves Node Web Framework Command CLI\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://easyjs.cn\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/4983042?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003esky\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hubcarl/easywebpack-cli/commits?author=hubcarl\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/hubcarl/easywebpack-cli/commits?author=hubcarl\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/jasonjcpeng\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/13363216?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ejasonjcpeng\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hubcarl/easywebpack-cli/commits?author=jasonjcpeng\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/hubcarl/easywebpack-cli/commits?author=jasonjcpeng\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/willworks\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/5542777?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKevin Zhong\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hubcarl/easywebpack-cli/commits?author=willworks\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/hubcarl/easywebpack-cli/commits?author=willworks\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/HiuYanChong\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/15319816?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHiuYanChong\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hubcarl/easywebpack-cli/commits?author=HiuYanChong\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/hubcarl/easywebpack-cli/commits?author=HiuYanChong\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/mice33\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/4945433?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMice\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hubcarl/easywebpack-cli/commits?author=mice33\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://www.hacke2.cn\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/6399899?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ehacke2\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hubcarl/easywebpack-cli/commits?author=hacke2\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n\n## License\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasy-team%2Feasywebpack-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasy-team%2Feasywebpack-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasy-team%2Feasywebpack-cli/lists"}