angularjs - Using grunt to concatenate all vendor javascript files? -


i'm using yeoman (v1.x) grunt (v0.4.2) build angular project. build task concatenates app/script js files, leaves of dependency files unconcatenated, built index.html makes these calls:

<script src="components/angular-unstable/angular.js"></script> <script src="components/jquery/jquery.js"></script> <script src="components/angular-resource/angular-resource.js"></script> <script src="components/bootstrap/js/bootstrap-dropdown.js"></script> <script src="components/moment/moment.js"></script> <script src="components/underscore/underscore.js"></script>  <!-- xxxxxbuild:js scripts/scripts.js --> <script src="scripts/274baf7d.scripts.js"></script> 

i of components project uses, i.e. angular.js, jquery.js, , forth, in scripts.js. easy reconfigure gruntfile so? or not done default practical reason?

yes, easy configure. add vendors scripts in sources pass grunt concat task.

// project configuration. grunt.initconfig({   concat: {     dist: {       src: ['vendors/**/*.js', 'scripts/**/*.js'],       dest: 'built.js'     }   } }); 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -