npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gulp-tasks-manager

v1.0.2

Published

Gulp tasks manager

Readme

gulp-tasks-manager

Gulp tasks manager. If you have too many tasks, you can split tasks into multiple pieces with this tool.

Install

npm install gulp-tasks-manager --save-dev

Demo

For example, here is the file structure of an app:

/--app
  |--build
      |--tasks
          |--script.js
          |--style.js
      |--gulpfile.js
  |--js
  |--css
  |--node_modules
  |--package.json

in gulpfile.js:

var gulp = require('gulp'),
	plugins = require('gulp-load-plugins')(),
	tasks = require('gulp-tasks-manager'),
	task = tasks(gulp, plugins, {
		rootDir: '../',
		taskDir: './tasks'
	});

task('script');
task('style');

gulp.task('default', tasks.list());

in tasks/script.js:

module.exports = function(gulp, plugins, ns) {
	var cxt = ns.context('./js'),
		path = {
			src: cxt('./**/*.js'),
			dst: cxt('./build')
		};

	gulp.task(ns('build'), function() {
		gulp.src(path.src)
			.pipe(plugins.uglify())
			.pipe(gulp.dest(path.dst));
	});

	gulp.task(ns('watch'), function() {
		gulp.watch(path.js, ns(['build']));
	});
};

in tasks/style.js:

module.exports = function(gulp, plugins, ns) {
	var cxt = ns.context('./css'),
		path = {
			src: cxt('./**/*.less'),
			dst: cxt('./build')
		};

	gulp.task(ns('build'), function() {
		gulp.src(path.src)
			.pipe(plugins.less())
			.pipe(gulp.dest(path.dst));
	});

	gulp.task(ns('watch'), function() {
		gulp.watch(path.less, ns(['build']));
	});
};

then just run gulp.

If you want:

  • just build and watch script, run gulp script
  • just build but not watch style, run gulp style:build

when executing task(script), it is just:

  • gulp.task('script:build', function(){})
  • gulp.task('script:watch', function(){})
  • gulp.task('script', ['script:build', 'script:watch'])

API

  • tasks(gulp, plugins [, opts])
    • gulp: the gulp as we all know
    • plugins: gulp-load-plugins(preferred) or a self-defined object
    • opts: options
      • rootDir: default to ./
      • taskDir: default to ./
  • tasks.list()
    • list main tasks
    • return value is the format of [namespace1, namespace2, ...]
  • tasks.listAll()
    • list all tasks(main tasks and subtasks)
    • return value is the format of {namespace1: [subtask1, subtask2], namespace2: [...], ...}
  • task(name [, filename])
    • name: namespace
    • filename: if missed, default to name
  • ns
    • ns.name: the namespace
    • ns.context(dir): locate the context dir of a namespace, return a function which is used to locate resources in the module represented by this namespace
    • ns(taskName): return string of namespace:taskName and add it to the task list
    • ns([taskName1, taskName2, ...]): return an array of string with each item is the format of namespace:taskNamex

License

MIT