• Search form is empty!

  • Gulp Tutorial - Part 16 Useful Gulp Commands & Tips

    http://robertdunaway.github.io

    http://mashupjs.github.io

    The Mashup is a learning tool that serves as a seed project for line-of-business applications. It’s goal is a shortened learning curve for building modern business applications and the reduction of technical debt.

    Smiley face

    This tutorial and more can be found in

    Gulp - Quick guide to getting up and running today

    Gulp Tutorial - Part 16

    Useful Gulp Commands & Tips

    Installing Gulp

    Execute both of these. The first adds Gulp locally so it can be used by NPM. The second installs Gulp globally so it can be accessed from the command line.

    npm install gulp --save-dev
    npm install gulp -g


    Retrieve Gulp version

    Grunt -version

    Installing plugins

    The syntax for Grunt plugins is
    install [plugin-name] --save-dev

    For example, if you want to minify and concatenate your JavaScript for performance, you would install two plugins.

    Perform a quick Google search and you’ll find this site
    https://github.com/gruntjs/grunt-contrib-uglify
    npm install grunt-contrib-uglify --save-dev

    Perform a quick google search and you’ll find this site
    https://github.com/gruntjs/grunt-contrib-concat
    npm install grunt-contrib-concat --save-dev

    Retrieve Gulp version

    Gulp --v

    Every Gulp file needs a default task. To execute Gulp’s default task

    grunt

    It’s useful to run specific tasks that you have configured

    grunt [task-name]

    Get a list of Grunt commands

    Grunt –help

    To verify a plugin is not blacklisted

    Gulp --verify

    Testing tasks while building your gulpfile.js
    You can type gulp [task-name] and your task will run. If it has any dependencies then those dependencies will run first.

    gulp [task-name]


    Source code for this tutorial

    Start the tutorial using this code base:

    https://github.com/MashupJS/gulp-tutorial


    A completed tutorial can be found here:

    https://github.com/MashupJS/gulp-tutorial-end-result


    Smiley face

    This tutorial and more can be found in

    Gulp - Quick guide to getting up and running today

    0 comments:

    Post a Comment