admin管理员组文章数量:1334395
We are currently planning a website which exists out of different AngularJS apps that will make use of mon services. Services will be implemented in seperate files; to minimize the filesize of the apps we want to include/concatenate only those service-files that are used in the corresponding app - so we are looking for the best practise in dependency management.
is there something like requireJS in angular or what would you suggest to handle the includes? thanks in advance .)
We are currently planning a website which exists out of different AngularJS apps that will make use of mon services. Services will be implemented in seperate files; to minimize the filesize of the apps we want to include/concatenate only those service-files that are used in the corresponding app - so we are looking for the best practise in dependency management.
is there something like requireJS in angular or what would you suggest to handle the includes? thanks in advance .)
Share Improve this question asked Aug 25, 2013 at 15:55 MrMuhMrMuh 4192 gold badges5 silver badges14 bronze badges 2- 2 Me personally? I'd just use Grunt and call it a day. – Joseph Silber Commented Aug 25, 2013 at 15:57
- Grunt is not a dependency manager. – mwilcox Commented Apr 25, 2015 at 18:58
3 Answers
Reset to default 3I suggest to use the same organization as ng-boilerplate: https://github./joshdmiller/ng-boilerplate
I use an organization close to ng-boilerplat for one project and it allowed us to be modular in our dependency management.
For me, the only build/deployment system that works like a charm for most web apps that have extremely js putation is yeoman.
This quote should describe what it is/does:
Yeoman 1.0 is more than just a tool. It's a workflow; a collection of tools and best practices working in harmony to make developing for the web even better.
So basically, it is a npm that installs all the boilerplate files, dependencies and configures your whole app with the help of generators. It uses bower and gruntalso takes care of the hard part of configuring grunt that is in charge of building/deploying your app.
I highly remend yeoman as a modern and efficient workflow.
I personally haven't looked at the ng-boilerplate
as @Julio mentioned above, but you could easily manage to configure and use RequireJS
with angular of you want to. I've done it and it works like a charm.
本文标签: javascriptAngularJS Dependency ManagementStack Overflow
版权声明:本文标题:javascript - AngularJS: Dependency Management - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742246500a2439871.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论