0.2.3 • Published 8 years ago

gulp-runner-tdp v0.2.3

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

#gulp-runner-tdp

Travis CI Coveralls - code coverage status

##Overview
(Yet another) Gulp-based task-runner. The main advantages (over most usage of Gulp I have seen) are:

  • Your gulp tasks can (really) easily be reusable plugins - as NPM modules
    • No more copy/paste of your gulpfile from one project to the next - backport your fixes/improvements to all your projects!
    • Plugins are just common JS modules (regular NPM modules) with no extra code required (so you probably already have them)
    • This encourages plugins/tasks to do one task only (and hopefully therefore) to do it well - the unix philosophy
  • It's really easy to keep customisations to your gulp tasks configurations in source control for your project
    • There's a helper library which makes it really easy to preferentially load your plugin config from your source-controlled files with automatic fallback to the default config file (the helper also provides a simple way to copy your config file to the project root on npm install etc.)

##Semver
This project aims to maintain the semver version numbering scheme.

##Changelog
See the changelog file

##Requirements

  • Node runtime - either:
    • Node >= 0.11
    • IOJS >= 1.0
  • Installation:
    • NPM
    • Git/GitHub
  • gulp (obviously!)

##NPM/Node package dependencies
###Production

###development

##Installation
###Via NPM (usually the simplest way)
Installation is super simple, in your command line terminal, just cd to your project root and run:

npm install gulp-runner-tdp gulp --save-dev

It is recommended to list gulp, gulp-runner-tdp and all required plugins in your project's package.json file - usually this would be in the devDependencies section as users won't typically need to run this in production.

###Via Git(Hub)

git clone https://github.com/neilstuartcraig/gulp-runner-tdp.git
npm install
npm install gulp

You may then want to add gulp and gulp-runner-tdp to your package.json file.

Also ensure that you have gulp installed locally in the project you're developing. To achieve this, you can run e.g. npm install gulp --save-dev in your project root or simply include both gulp-runner-tdp and gulp in your NPM package.json file.

You will also need to include all the gulp-runner-tdp plugins you require (these add gulp tasks - see below for more details).

##Usage Runtime usage of gulp-runner-tdp is the same as native gulp, namely you can simply run:

gulp <task-name>[ <task-name-2> <task-name-3> ...]

(where the tasks are defined via plugins)

NOTE: If you want to chain tasks in a reliable order or create complex parallel/series configurations, you may wish to consider a gulp plugin called gulp-sequence

##Configuration files and source control When you install gulp-runner-tdp, the NPM post-install script creates a directory called gulp-runner-tdp in your project root. This directory contains another directory called config into which the installer copies the default gulp-runner-tdp configuration file (gulp-runner-tdp-core-config.js). This is the highest priority configuration file for gulp-runner-tdp (so it'll be used by default when you run gulp-runner-tdp via gulp <task-name-X>) and is intended to be modified to suit your project and to be saved in your source control repository along with your project code.

You can place gulp-runner-tdp plugin configuration files into the same (<project root>/gulp-runner-tdp/config/) directory. By convention, gulp-runner-tdp plugins should install their default configuration file(s) and use these project-local configuration file(s) as their highest priority - this allows you to source-control your plugin configurations easily too.

It is recommended to follow the regular node convention of excluding the node_modules directory from your source control via e.g. .gitignore.

##Plugins (tasks) Tasks are added via the addition of plugins, these are separate npm modules - keeping them distinct and dedicated. Plugins can define any number of tasks and simply use standard gulp syntax for adding tasks, e.g.:

var gulp=require("gulp");
gulp.task("some-task", function()
{
  // task logic goes here
});

The convention is that your plugin npm package has a directory/folder in its root called "tasks" - task files must be stored here as .js files. gulp-runner-tdp will load all the .js files present in this directory for each of the plugins it finds and will make all tasks defined in these files available to be run via gulp.

Once your project npm is installed (providing you have adhered to the above), you can then run the above task via:

gulp some-task

###Plugin creation guide
To create a plugin, probably the simplest starter is to look at one of the plugins below. As a more general guide though, you would need to create a project (ideally an npm package) which:

  • Has a directory/folder called "tasks" in the root directory - tasks must be stored in this directory/folder
  • Has one or more tasks (you can define one or more tasks per file) which simply define standard gulp tasks
  • Installs necessary files (e.g. configuration) into the project root to enable users to source-control their configuration files - since this is the purpose of this plugin. This should be done in the npm postinstall phase
  • Can optionally make use of gulp-runner-tdp-plugin-helper-lib to help with creating installers

###Available plugins

##Known issues
None currently

##Tests
There are some built-in tests which use Mocha, you can run these (after installation) via:

npm test

All test should pass - we use Travis CI to verify this with each push to the GitHub master branch.

##Bugs
If you find a bug, please let me know via an issue.

##Contributing
If you have ideas for improvements or want to contribute a bug fix, please create an issue first so we can discuss and make sure we don't duplicate efforts and that the idea is in the right direction for the plugin.

##License
This plugin is released under an MIT license. Please drop me a line if you use the plugin so I have an idea of usage.

0.2.3

8 years ago

0.1.14

9 years ago

0.1.13

9 years ago

0.1.12

9 years ago

0.1.10

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.0.23

9 years ago

0.0.22

9 years ago

0.0.21

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.11

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago