Automate and enhance your workflow – Introduction – Lets get Started !



Automate and enhance your workflow – Introduction – Lets get Started !

0 0


Gulpjs_presentation


On Github kmathur7 / Gulpjs_presentation

Automate and enhance your workflow

Introduction

What  is  a  Workflow?

Why  is  automation  required?

Lets get Started !

Installation Steps

                            npm init // initialize package.json 
                        
                            npm install -g gulp // global installation
                        
                            npm install gulp --save-dev // local installation
                        

gulpfile.js

                var gulp = require('gulp'); //importing node package

                gulp.task('default',function(){
                console.log('Hello World');
                });
                        

require('gulp')

gulp.task

Plugins

General Plugins

gulp-uglify gulp-jshint gulp-watch gulp-concat gulp-minify-css gulp-livereload

http://gulpjs.com/plugins

gulp-uglify

Minify files with UglifyJS

                    var gulp = require('gulp');
                    var uglify = require('gulp-uglify');

                    gulp.task('scripts', function(){
                    gulp.src('js/*.js')
                        .pipe(uglify())
                        .pipe(gulp.dest('build/js'));
                    });

                    gulp.task('default',['scripts']);            
                        

.pipe() ??