@kolibridev/gulp-tasks
Collection of useful gulp tasks
Last updated 4 years ago by benediktvaldez .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kolibridev/gulp-tasks 
SYNC missed versions from official npm registry.

Gulp tasks

Collection of useful gulp tasks. WIP!

Usage

npm install @kolibridev/gulp-tasks

Example

Config

See gulpconfig-defaults for all default options. Usually something like this will suffice.

// ./gulp/config.js
const path = require('path')
const gutil = require('gulp-util')
const assign = require('lodash.assign')
const pkg = require('../package.json')

const config = {
  version: pkg.version,
  source: path.resolve(__dirname, '../src'),
  target: path.resolve(__dirname, '../dist'),
  minify: false,
  debug: true,
  url: 'https://dev.domain.com',
}

const envs = {
  prod: {
    minify: true,
    debug: false,
    url: 'https://www.domain.com',
  },
}

// Extend with environment specific config
const env = gutil.env.env || (gutil.env.prod ? 'prod' : 'dev')
assign(config, envs[env])

module.exports = config

Gulpfile

This can be directly in ./gulpfile.js or create something like ./gulp/index.js and require it in ./gulpfile.js

// ./gulpfile.js
require('./gulp')

This package exposes a function that optionally takes in your config. This example will register all the tasks for you. You can theoretically just register the tasks you're actually going to use. NOTE: If you create a local task (within your own project) with the same name as one of these, it will overwrite it's function.

// ./gulp/index.js
const gulp = require('gulp')
const gutil = require('gulp-util')
const _ = require('lodash')
const config = require('./config')

_.forOwn(require('@kolibridev/gulp-tasks')(config).tasks, (task) => {
  gutil.log(gutil.colors.green(`Registered ${gutil.colors.blue(task.name)} task`))
  gulp.task(task.name, task.dep, task.fn)
})

Current Tags

  • 0.11.10                                ...           latest (4 years ago)

30 Versions

  • 0.11.10                                ...           4 years ago
  • 0.11.9                                ...           4 years ago
  • 0.11.6                                ...           4 years ago
  • 0.11.5                                ...           4 years ago
  • 0.11.4                                ...           4 years ago
  • 0.11.3                                ...           4 years ago
  • 0.11.2                                ...           4 years ago
  • 0.11.1                                ...           4 years ago
  • 0.11.0                                ...           4 years ago
  • 0.10.0                                ...           4 years ago
  • 0.9.6                                ...           4 years ago
  • 0.9.5                                ...           4 years ago
  • 0.9.3                                ...           4 years ago
  • 0.9.2                                ...           4 years ago
  • 0.9.1                                ...           4 years ago
  • 0.9.0                                ...           4 years ago
  • 0.8.0                                ...           4 years ago
  • 0.7.0                                ...           4 years ago
  • 0.7.1                                ...           4 years ago
  • 0.6.1                                ...           4 years ago
  • 0.6.0                                ...           4 years ago
  • 0.5.0                                ...           4 years ago
  • 0.4.0                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Downloads
Today 30
This Week 30
This Month 30
Last Day 0
Last Week 0
Last Month 1
Dependencies (32)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |