- First, we add Gulp to package.json and the Gulp plugins. Then we need to minify and bundle these two JavaScript files if this file doesn't exist in the web application:
- We add the gulp-concat plugin, which concatenates the (bundle) files, and then we add gulp-uglify, which minifies the .js files, removing whitespaces and comments, and writes the name of the module we want to add to the devDependencies section:
- Let's create a gulpfile.js (a gulp configuration file):
- The generated file contains the following code: