Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
48
rated 0 times [  54] [ 6]  / answers: 1 / hits: 49544  / 10 Years ago, tue, april 22, 2014, 12:00:00

Is there a way to reduce the following includes down to one?



<script src=//ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular.min.js></script>
<script src=//ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular-route.min.js></script>
<script src=//ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular-sanitize.min.js></script>
<script src=//ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular-animate.min.js></script>
<script src=//ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular-cookies.min.js></script>


I cannot find a combined version of these hosted on Google's CDN.


More From » angularjs

 Answers
374

I have been looking for a bundle myself, but haven't found one yet. Seems to me you have to bundle them manually if you want to have them all in one js. file.






I was thinking about creating a grunt task (or similar) to fetch all dependencies and merge them into one file. I know you want to use a CDN, but just wanted to share that thought.



update

For anyone interested in the latter, just came across this grunt-fetch-from-cdn plugin. Haven't tried it myself yet, but looks interesting.


[#71339] Monday, April 21, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
blaisep

Total Points: 748
Total Questions: 95
Total Answers: 108

Location: Federated States of Micronesia
Member since Sun, May 16, 2021
3 Years ago
blaisep questions
Wed, Dec 16, 20, 00:00, 4 Years ago
Sun, Aug 16, 20, 00:00, 4 Years ago
Tue, Nov 12, 19, 00:00, 5 Years ago
Mon, Nov 11, 19, 00:00, 5 Years ago
;