 <p>As Alexander said, if you choose <a href="http://gruntjs.com" rel="nofollow">Grunt</a>, you can use a <a href="https://github.com/gruntjs/grunt-contrib-concat" rel="nofollow">concat plugin</a> to merge a list of selected files into a single destination:</p> <p>after you load the select plugin in your gruntfile.js</p> <pre><code>grunt.loadNpmTasks('grunt-contrib-concat'); </code></pre> <p>define a task in grunt configuration:</p> <pre><code>grunt.initConfig({ concat: { options: { separator: ';', }, dist: { // your source file list src: ['src/js/*.js'], //your destination file dest: 'dist/app.js', }, }, }); </code></pre> <p>then register this task to a list:</p> <pre><code>grunt.registerTask('compile', ['concat']); </code></pre> <p>this would be run by typing "grunt compile" on the command line</p> <p>so you only have to include the dist/app.js file in your index.</p> <p>There are many plugins available in grunt, i.e. you can inculde your app.js file dynamically using the <a href="https://www.npmjs.com/package/grunt-include-source" rel="nofollow">grunt-include-source</a> plugin, or minimize the js files using <a href="https://github.com/gruntjs/grunt-contrib-uglify" rel="nofollow">grunt-contrib-uglify</a>.</p> <p>More information on the gruntfile are available <a href="http://gruntjs.com/sample-gruntfile" rel="nofollow">here</a></p> <p>You can achieve the result as requested in the second point instead, i think you could use solutions like:</p> <ul> <li><a href="https://webpack.github.io/" rel="nofollow">WebPack</a></li> <li><a href="http://requirejs.org/" rel="nofollow">RequireJS</a></li> </ul> <p><strong>UPDATE</strong>:</p> <p>I couldn't find a concat end to end tutorial, I'm sorry.</p> <p>For a generic Grunt tutorial you can read <a href="http://adrianmejia.com/blog/2014/10/07/grunt-js-tutorial-from-beginner-to-ninja/" rel="nofollow">this</a></p> <p>Otherwise you can follow the <a href="http://gruntjs.com/getting-started" rel="nofollow">getting started</a> page from the official Grunt site for installation, configuration and have a general overview.</p> <p>When they talk about plugins please refer to the README of the <a href="https://github.com/gruntjs/grunt-contrib-concat" rel="nofollow">grunt-contrib-concat</a> plugin linked and explained above.</p> <p>Those pages could give you all the skills needed.</p> <p>Finally, customize the concat configuration in Gruntfile.js by putting in <code>dist.src</code> all files to be merged into the file set as <code>dist.dest</code> and only include the latter in your html.</p> <p>Once the set-up is complete, execute your task by typing <code>grunt compile</code> on the command line in your project folder, and the merged file will be produced.</p>