Socket
Socket
Sign inDemoInstall

engulf

Package Overview
Dependencies
208
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    engulf

Write gulp tasks using a simple config


Version published
Weekly downloads
3
increased by50%
Maintainers
1
Install size
1.70 MB
Created
Weekly downloads
 

Readme

Source

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...

Keywords

FAQs

Last updated on 05 Aug 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc