system | tasks runner It’s open source https://github.com/gulpjs/gulp/ It uses Node.js as a platform Gulp source and your Gulp file, where you define tasks, are written in JavaScript. It’s easy to understand
and redoing things many times but we know the languages and tools that we have and the features they offer. We know those features can help us assemble a solution. What can we do?
in Gulp, There is a ton of flexibility in the things that you can do. You can also write your own plugin. In any case, you can find them easily at • gulpjs.com/plugins/ • npmjs.com • google search ;) Most plugins are pretty easy to use, and have good documentation. PLUGINS
files for better organization (It’s easier to maintain). But the browser will open a ton of requests to our server. This is not an efficient way. With concat, we can merge or combine the files together into one large file. Minify | Uglify Remove unnecessary or redundant data without affecting the file. Files are loaded twice as fast. Live Reloads When a file is edited/saved, it automatically refreshes a browser. Prefixing CSS I won’t go into much detail about why using Autoprefixer is better than writing browser prefixes by hand.... Autoprefixer updates the stylesheets to add prefixes. PLUGINS
machine. Node.js can be downloaded for Windows, Mac and Linux. The most painless method of installing NodeJS and & NPM is through their website nodejs.org/download/. Node.js Node.js Gulp.js Gulp.js initiating npm project npm init //set up the package.json npm install gulp-g //to install gulp in a global installation nmp install gulp --save-dev //to install a local version of gulp Create a Gulpfile.js in the root of your project folder
FOLDER gulp.src tells Gulp what files or folder to use for the task First DEFINE A TASK-NAME The basic syntax of a gulp task is: gulp. task(‘task-name’, function() { // task }); Third DEFINE THE DESTINATION FOLDER gulp.dest tells Gulp where to pipe the re- sult in an out folder or destination folder once the task is completed A task is a function() with a return value which defines: