gulp-install-tools

1.1.1 • Public • Published

NPM version GitHub tag GitHub issues GitHub pull requests GitHub watchers GitHub stars GitHub forks Build Status NPM

gulp-install-tools

A Simple Toolset to Help Install & Uninstall Gulp Plugins.

Install with NPM

sudo npm install gulp-install-tools --save-dev

Usage

Before:

  sudo npm install --save-dev gulp-{util,data,add-src,notify,filter,git,include,template,imagemin,tag-version,bump,flatmap,if,concat,uglify,responsive,rename,replace,pug,verb}

After:

const gulp = require('gulp'),
      $    = require('gulp-install-tools')(gulp, [ // List of Gulp Plugins you want installed
        'util',
        'data',
        'add-src',
        'notify',
        'filter',
        'git',
        'include',
        'template',
        'imagemin',
        'tag-version',
        'bump',
        'flatmap',
        'if',
        'pug',
        'concat',
        'uglify',
        'responsive',
        'rename',
        'replace',
        'verb'
      ])

Then Run in the Command Line:

# whatever is in the list will be installed 
gulp install

or

# whatever is not in the list will be uninstalled 
gulp uninstall

Now you can use in gulpfile.js

  gulp.task('default',() => {
    return gulp.src('./templates/pages/*.pug')
      .pipe($.pug({pretty: true}))
      .pipe(gulp.dest('./dist'));
  });

Generated Tasks

Install Task

The install task is to install tasks that are in your list of specified packages

Example:

gulp install

Uninstall Task

The uninstall task is to uninstall tasks that are not in your list of specified packages

Example:

gulp uninstall

Bump Task

The bump task is to bump the package.json version number by one at each float point common args are ['--patch','--minor','--major','--pre']

Example:

# Bumps the version to *.*.1 
gulp bump

Example:

# Bumps the version to *.*.1 
gulp bump --patch

Example:

# Bumps the version to *.1.* 
gulp bump --minor

Example:

# Bumps the version to 1.*.* 
gulp bump --major

Example:

# Bumps the version to *.*.*-0 
gulp bump --pre

Init Task

The init task is to initialize an empty repository in your directory if one already exists it does nothing but tell you one already exists

Example:

gulp init

Tag Task

The tag task is to create a git tag from the package.json version

Example:

gulp tag

Commit Task

Note: You will have to use the sudo command before it

The commit task is to commit changes to your repo common args are['--message']

Example:

sudo gulp commit

Example:

sudo gulp commit --message "Initial Commit"

Publish Task

Note: You will have to use the sudo command before it

The publish task is to publish your package to npmjs very helpful if your developing your own gulp plugin or a normal npm package it depend on the tag & commit tasks which both depend on the init task

Example:

sudo gulp publish

Auto-Bumping & Publishing

The easiest way that i have found to do this is:

gulp bump;sudo gulp publish

Author

Jeremy Bolding

Copyright & License

Copyright (c) 2016 Jeremy Bolding, All Rights Reserved. Licensed under the MIT License.


Package Sidebar

Install

npm i gulp-install-tools

Weekly Downloads

0

Version

1.1.1

License

MIT

Last publish

Collaborators

  • jbolding