UNPKG

10.3 kBMarkdownView Raw
1# easywebpack
2
3[![NPM version][npm-image]][npm-url]
4[![build status][travis-image]][travis-url]
5[![Test coverage][codecov-image]][codecov-url]
6[![David deps][david-image]][david-url]
7[![npm download][download-image]][download-url]
8
9[npm-image]: https://img.shields.io/npm/v/easywebpack.svg?style=flat-square
10[npm-url]: https://npmjs.org/package/easywebpack
11[travis-image]: https://travis-ci.org/easy-team/easywebpack.svg?branch=master
12[travis-url]: https://travis-ci.org/easy-team/easywebpack
13[codecov-image]: https://codecov.io/gh/easy-team/easywebpack/branch/master/graph/badge.svg
14[codecov-url]: https://codecov.io/gh/easy-team/easywebpack
15[david-image]: https://img.shields.io/david/easy-team/easywebpack.svg?style=flat-square
16[david-url]: https://david-dm.org/easy-team/easywebpack
17[snyk-image]: https://snyk.io/test/npm/easywebpack/badge.svg?style=flat-square
18[snyk-url]: https://snyk.io/test/npm/easywebpack
19[download-image]: https://img.shields.io/npm/dm/easywebpack.svg?style=flat-square
20[download-url]: https://npmjs.org/package/easywebpack
21
22
23 A Simple, Powerful Wepback Front-End Development Solution
24
25## Feature
26
27- ✔︎ Provide Webapck Development and Build Capabilities, Such As Normal Webpack Plugin And Loaders
28- ✔︎ Provide Base Capabilities Support, Such As PostCss, Sass, Less, Stylus, Css Module, Service Worker
29- ✔︎ Provide Webpack Basic Development And Build Capabilities, Such As Dev server, Hot-Reload, TypeScript, Dll
30- ✔︎ Provide Webpack Efficient Development Tool, Such As Bundle Size Analysis, Bundle Build Cost Analysis, Mock Server, HTTP Web Server And So On.
31- ✔︎ Provide Multiple Types Of Project Building, Such As React, Vue, Weex, HTML, Weex Application
32- ✔︎ Provide Webpack Web (Browser Client Side Render) And Node (Node Server Side Render) Buiding Mode
33- ✔︎ Provide Strong Extend Capabilities For More Front-End Framework
34
35
36![easywebpack](/docs/images/easywebpack.png)
37
38
39## Document
40
41- https://easyjs.cn
42- https://www.yuque.com/easy-team/easywebpack
43- https://zhuanlan.zhihu.com/easywebpack
44
45
46## Install
47
48```bash
49$ npm i @easy-team/easywebpack --save-dev
50```
51
52## Usage
53
54- Webpack Config
55
56```js
57// ${root}/webpack.config.js
58const easywebpack = requier('@easy-team/easywebpack');
59const env = process.env.BUILD_ENV; // support dev/test/prod
60const webpackConfig = easywebpack.getWebpackConfig({
61 env,
62 target: 'web',
63 entry: {
64 index: 'src/app.js'
65 }
66});
67module.exports = webpackConfig;
68```
69
70
71## Front-End Framework
72
73- [easywebpack-vue](https://github.com/easy-team/easywebpack-vue.git)
74- [easywebpack-react](https://github.com/easy-team/easywebpack-react.git)
75- [easywebpack-weex](https://github.com/easy-team/easywebpack-weex.git)
76- [easywebpack-html](https://github.com/easy-team/easywebpack-html.git)
77- [easywebpack-js](https://github.com/easy-team/easywebpack-js.git)
78
79## Webpack Command Tool
80
81```bash
82npm install easy-team/easywebpack-cli -g
83```
84
85#### QuickStart Programming
86
87[easywebpack-cli](https://github.com/easy-team/easywebpack-cli) Webpack Building Command Line And Boilerplate Init Tool for easywebpack
88
89![easy-init](/docs/images/easy-init.png)
90
91![easy-egg-vue](/docs/images/easy-egg-vue.png)
92
93![easy-egg-react](/docs/images/easy-egg-react.png)
94
95#### Efficient Development
96
97- Use the plugin `webpack-bundle-analyzer` or `stats-webpack-plugin` for webpack build size analysis
98
99 ```
100 easy build --size
101 ```
102
103 ![easy-build-size](/docs/images/easy-build-size.png)
104
105
106- Use the plugin `speed-measure-webpack-plugin` for webpack build speed analysis and count the time spent on each loader and plugin
107
108 ```
109 easy build --speed
110 ```
111
112- support start local file web http server and [data mock service](https://www.yuque.com/easy-team/easywebpack/mock) by node-http-server
113
114 ```
115 easy server -d mock
116 ```
117
118
119
120## Application Boilerplate
121
122### Vue/React Client Side Render Application
123
124 - [Vue-Webpack-Boilerplate](https://github.com/easy-team/easywebpack-awesome/tree/master/boilerplate/vue) Vue Front-End Application
125
126 - [React-Wbpack-Boilerplate](https://github.com/easy-team/easywebpack-awesome/tree/master/boilerplate/react) React Front-End Application
127
128### Egg + Vue Server/Client Side Render Webpack Building Application
129
130 - [Egg + Vue Server Side Render Application](https://github.com/easy-team/egg-vue-webpack-boilerplate/tree/feature/green/multi)
131
132 - [Egg + Vue + Vuex + Vue-Router Server Side Render Application](https://github.com/easy-team/egg-vue-webpack-boilerplate/tree/feature/green/spa)
133
134 - [Egg + Vue + Vuex + Vue-Router Client Side Render Application](https://github.com/easy-team/egg-vue-webpack-boilerplate/tree/feature/green/asset)
135
136 - [Egg + Vue + Nunjucks HTML Static Render Application](https://github.com/easy-team/egg-vue-webpack-boilerplate/tree/feature/green/html)
137
138 - [Egg + Element Admin Application](https://github.com/easy-team/egg-vue-webpack-boilerplate/tree/element-admin)
139
140 - [Egg + Vue + Typescript Web Application](https://github.com/easy-team/egg-vue-typescript-boilerplate) 和 [ves-admin](https://github.com/easy-team/ves-admin)
141
142
143### Egg + React Server/Client Side Render Webpack Building Application
144
145
146 - [Egg + React Server Side Render Application](https://github.com/easy-team/egg-react-webpack-boilerplate/tree/feature/green/multi)
147 - [Egg + React + Nunjucks HTML Static Render Application](https://github.com/easy-team/egg-react-webpack-boilerplate/tree/feature/green/html)
148 - [Egg + React + Nunjucks HTML Dynamic Render Application](https://github.com/easy-team/egg-react-webpack-boilerplate/tree/feature/green/asset)
149 - [Egg + React + React Router + Redux Single Page Application](https://github.com/easy-team/egg-react-webpack-boilerplate/tree/feature/green/spa)
150
151 - [Egg + AntD + React Router + Redux + React-Redux](https://github.com/easy-team/egg-react-webpack-boilerplate/tree/easy-admin)
152
153 - [Egg + React + Typescript Web Application](https://github.com/easy-team/egg-react-typescript-boilerplate)
154
155
156### Weex/HTML Webpack Building Application
157
158 - [Weex-Webpack-Example](https://github.com/easy-team/easywebpack-weex-boilerplate) Weex Front-End Application
159 - [Html-Webpack-Example](https://github.com/easy-team/easywebpack-multiple-html-boilerplate) HTML Front-End Application
160
161
162## Questions & Suggestions
163
164Please open an issue [here](https://github.com/easy-team/easywebpack/issues).
165
166## Contributors
167
168<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
169<!-- prettier-ignore-start -->
170<!-- markdownlint-disable -->
171<table>
172 <tr>
173 <td align="center"><a href="https://easyjs.cn"><img src="https://avatars2.githubusercontent.com/u/4983042?v=4" width="100px;" alt=""/><br /><sub><b>sky</b></sub></a><br /><a href="https://github.com/hubcarl/easywebpack/commits?author=hubcarl" title="Code">💻</a> <a href="https://github.com/hubcarl/easywebpack/commits?author=hubcarl" title="Documentation">📖</a></td>
174 <td align="center"><a href="https://github.com/jasonjcpeng"><img src="https://avatars0.githubusercontent.com/u/13363216?v=4" width="100px;" alt=""/><br /><sub><b>jasonjcpeng</b></sub></a><br /><a href="https://github.com/hubcarl/easywebpack/commits?author=jasonjcpeng" title="Code">💻</a> <a href="https://github.com/hubcarl/easywebpack/commits?author=jasonjcpeng" title="Documentation">📖</a></td>
175 <td align="center"><a href="https://github.com/willworks"><img src="https://avatars2.githubusercontent.com/u/5542777?v=4" width="100px;" alt=""/><br /><sub><b>Kevin Zhong</b></sub></a><br /><a href="https://github.com/hubcarl/easywebpack/commits?author=willworks" title="Code">💻</a> <a href="https://github.com/hubcarl/easywebpack/commits?author=willworks" title="Documentation">📖</a></td>
176 <td align="center"><a href="https://github.com/HiuYanChong"><img src="https://avatars0.githubusercontent.com/u/15319816?v=4" width="100px;" alt=""/><br /><sub><b>HiuYanChong</b></sub></a><br /><a href="https://github.com/hubcarl/easywebpack/commits?author=HiuYanChong" title="Code">💻</a> <a href="https://github.com/hubcarl/easywebpack/commits?author=HiuYanChong" title="Documentation">📖</a></td>
177 <td align="center"><a href="https://www.thonatos.com"><img src="https://avatars2.githubusercontent.com/u/958063?v=4" width="100px;" alt=""/><br /><sub><b>Suyi</b></sub></a><br /><a href="https://github.com/hubcarl/easywebpack/commits?author=thonatos" title="Code">💻</a> <a href="https://github.com/hubcarl/easywebpack/commits?author=thonatos" title="Documentation">📖</a></td>
178 <td align="center"><a href="https://blog.dada.li"><img src="https://avatars0.githubusercontent.com/u/3274850?v=4" width="100px;" alt=""/><br /><sub><b>Roy Li</b></sub></a><br /><a href="https://github.com/hubcarl/easywebpack/commits?author=geekdada" title="Code">💻</a> <a href="https://github.com/hubcarl/easywebpack/commits?author=geekdada" title="Documentation">📖</a></td>
179 <td align="center"><a href="https://github.com/mice33"><img src="https://avatars2.githubusercontent.com/u/4945433?v=4" width="100px;" alt=""/><br /><sub><b>Mice</b></sub></a><br /><a href="https://github.com/hubcarl/easywebpack/commits?author=mice33" title="Code">💻</a> <a href="https://github.com/hubcarl/easywebpack/commits?author=mice33" title="Documentation">📖</a></td>
180 </tr>
181 <tr>
182 <td align="center"><a href="https://github.com/jacksky007"><img src="https://avatars3.githubusercontent.com/u/2378915?v=4" width="100px;" alt=""/><br /><sub><b>小杰</b></sub></a><br /><a href="https://github.com/hubcarl/easywebpack/commits?author=jacksky007" title="Code">💻</a> <a href="https://github.com/hubcarl/easywebpack/commits?author=jacksky007" title="Documentation">📖</a></td>
183 <td align="center"><a href="http://nootn.com/"><img src="https://avatars3.githubusercontent.com/u/898354?v=4" width="100px;" alt=""/><br /><sub><b>asins</b></sub></a><br /><a href="https://github.com/hubcarl/easywebpack/commits?author=asins" title="Code">💻</a> <a href="https://github.com/hubcarl/easywebpack/commits?author=asins" title="Documentation">📖</a></td>
184 </tr>
185</table>
186
187<!-- markdownlint-enable -->
188<!-- prettier-ignore-end -->
189<!-- ALL-CONTRIBUTORS-LIST:END -->
190<!-- prettier-ignore-start -->
191<!-- markdownlint-disable -->
192<!-- markdownlint-enable -->
193<!-- prettier-ignore-end -->
194<!-- ALL-CONTRIBUTORS-LIST:END -->
195
196## License
197
198[MIT](LICENSE)
199
\No newline at end of file