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 🙏

© 2024 – Pkg Stats / Ryan Hefner

engulf

v0.1.0

Published

Write gulp tasks using a simple config

Downloads

21

Readme

engulf

Write gulp tasks using a simple config

npm version

What is engulf?

engulf is a small node module that will help you write gulp tasks using a simple config.

Install

npm install engulf

Sample gulpfile.js using engulf

This file will give you a taste of what engulf does. This does the same thing that the sample gulpfile.js of gulp does.

var config = {
  paths: {
    scripts: ['client/js/**/*.coffee', '!client/external/**/*.coffee'],
    images: 'client/img/**/*'
  },
  tasks: {
    clean: {
      fn: function(cb, tools, gulp) {
        tools.del(['build'], cb);
      }
    },
    scripts: {
      deps: ['clean'],
      src: 'scripts',
      dest: 'build/js',
      run: ['sourcemaps.init', 'coffee', 'uglify', {concat: 'all.min.js'}, 'sourcemaps.write', 'dest']
    },
    images: {
      deps: ['clean'],
      src: 'images',
      dest: 'build/img',
      run: [ { imagemin: {optimizationLevel: 5} }, 'dest']
    },
    watch: {
      scripts: 'scripts',
      images: 'images'
    },
    default: ['watch', 'scripts', 'images']
  },
  tools: {
    del: 'del'
  }
}

var engulf = require('engulf');
engulf.importTools();
engulf.run(config);

Want to write some tasks without config?

var gulp = engulf.gulp;
var tools = engulf.tools;
gulp.task('clean', function(cb) {
  tools.del(['build'], cb);
});

Documentation

engulf.run(config)

This does the following:

  • engulf.load(config)
  • engulf.requireTools()
  • engulf.registerTasks()

engulf.load(config)

Merges supplied config object with engulf.config

engulf.importTools()

Fetches all gulp- plugins from devDependencies of package.json file and adds it to engulf.config.tools. Plugin names are converted to camelCase style.

Example: plugin gulp-minify-css will be loaded as minifyCss which can be used in run array and can also be accessed using engulf.tools.minifyCss

engulf.requireTools()

Loads all tools present in engulf.config.tools into engulf.tools using require()

engulf.registerTasks(tasks)

Registers list of tasks specified by tasks array that are present in engulf.config.tasks using gulp.task(). If tasks is omitted then all tasks in engulf.config.tasks will be registered.

More documentation coming soon...