angular.js - How to package angular 2 applications? How to use gulp packaging?
给我你的怀抱
给我你的怀抱 2017-05-15 17:05:22
0
4
619

Angular 2 emphasizes modularity, and the number of packages downloaded from npm is huge. How to make the output application only contain the required modules?
And how to use gulp to package angular2 application?

给我你的怀抱
给我你的怀抱

reply all(4)
Peter_Zhu

Thank you for the invitation. I haven’t started learning Angular2 yet, but I have been playing with typescript recently. I wrote a gulp+typescript+AngularJS1.x environment to play with. I am interested in studying together: https://github.com/hjzheng/ An...

About Angular2, there are actually many seeds on Github, either based on webpack or gulp:
https://github.com/search?q=a...

In addition, there are some Angular2 scaffolding on yeoman
http://yeoman.io/generators/

小葫芦

Recommend angular2-webpack-starter and angular2-universal-starter.

过去多啦不再A梦

Thank you for the invitation. I have never used angular2. I use react. You can try packaging it with webpack

大家讲道理

Thanks for the invitation. I have never used angular2, so I don’t know what its special features are. I can only say generally,

Gulp packaging is actually mainly divided into css, js, and html.

We classify angular as js, so what js packaging actually does is to analyze the packaging entry file, parse the dependent js files, then merge the js files, add dependencies, compress, add md5 stamp, and output to the directory.

According to your question, what you need to focus on is packaging entry files and parsing dependencies. You can use the angular-related gulp plug-in, or you can use webpack to parse, both of which can reach your directory.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template