Reputation: 983
I am giving the final details to my first AngularJS app and I am creating a Gulp config for uglifying my code and set some constants to get a cleaner way to define differents environments.
Now, this is my project folder structure with my components order by folder, so each component has a folder, so it's cleaner to my to develop as I have many components:
src
├── app
│ ├── app.js
│ ├── config.js
│ └── index.html
└── resources
│ └── [...3rd party libraries...].min.js
└── components
├── admin
| ├── users
| | ├── users.list.controller.js
| | └── users.list.view.html
| └── areas
| ├── areas.list.controller.js
| └── areas.list.view.html
├── [...etc...]
└── [...etc...]
Now as of my config in my index.html I have all these .js imported, for example:
<script src="components/admin/users/users.list.controller.js"></script>
<script src="components/admin/areas/areas.list.controller.js"></script>
The question is, should I concatenate all my components code in only one file? If so, how can I turn all my html js imports into only one (I'm asking for a automatized way, of course :))
If anyone has any thought on my app structure or standars, it's welcome
Thanks!
Upvotes: 0
Views: 236
Reputation: 1529
We usually decide to beak our bundle/minified file based on size. We use different approach in development and production environment.
Development environment :
Production Environment
References
Upvotes: 1