# gulp4-tasks

> tasks for gulp 4.0

Latest version **0.1.26** (published 2019-10-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp4-tasks
pnpm add gulp4-tasks
yarn add gulp4-tasks
bun add gulp4-tasks
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.26 |
| Published | 2019-10-09 |
| First published | 2018-11-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 30 |
| Unpacked size | 23.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | KOBAYASHI atsushi |
| Maintainers | kobaatsu |
| Keywords | gulp |

## Links

- npm: https://www.npmjs.com/package/gulp4-tasks
- Repository: https://github.com/kobaatsu/gulp4-tasks
- Issues: https://github.com/kobaatsu/gulp4-tasks/issues
- npm.io page: https://npm.io/package/gulp4-tasks

## Dependencies (30)

- [del](https://npm.io/package/del.md) ^5.1.0
- [gulp](https://npm.io/package/gulp.md) ^4.0.2
- [open](https://npm.io/package/open.md) ^6.4.0
- [cssnano](https://npm.io/package/cssnano.md) ^4.1.10
- [gulp-if](https://npm.io/package/gulp-if.md) ^3.0.0
- [webpack](https://npm.io/package/webpack.md) ^4.41.0
- [gulp-pug](https://npm.io/package/gulp-pug.md) ^4.0.1
- [gulp-svgo](https://npm.io/package/gulp-svgo.md) ^2.1.1
- [uglify-es](https://npm.io/package/uglify-es.md) ^3.3.9
- [gulp-coffee](https://npm.io/package/gulp-coffee.md) ^3.0.3
- [gulp-concat](https://npm.io/package/gulp-concat.md) ^2.6.1
- [gulp-header](https://npm.io/package/gulp-header.md) ^2.0.9
- [gulp-notify](https://npm.io/package/gulp-notify.md) ^3.2.0
- [gulp-rename](https://npm.io/package/gulp-rename.md) ^1.4.0
- [gulp-stylus](https://npm.io/package/gulp-stylus.md) ^2.7.0
- [gulp-uglify](https://npm.io/package/gulp-uglify.md) ^3.0.2
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^9.6.4
- [browser-sync](https://npm.io/package/browser-sync.md) ^2.26.7
- [css-mqpacker](https://npm.io/package/css-mqpacker.md) ^7.0.0
- [gulp-plumber](https://npm.io/package/gulp-plumber.md) ^1.2.1
- [gulp-postcss](https://npm.io/package/gulp-postcss.md) ^8.0.0
- [gulp-imagemin](https://npm.io/package/gulp-imagemin.md) ^6.1.1
- [gulp-markdown](https://npm.io/package/gulp-markdown.md) ^5.0.1
- [gulp-svgstore](https://npm.io/package/gulp-svgstore.md) ^7.0.1
- [webpack-stream](https://npm.io/package/webpack-stream.md) ^5.2.1
- [postcss-sorting](https://npm.io/package/postcss-sorting.md) ^5.0.1
- [imagemin-mozjpeg](https://npm.io/package/imagemin-mozjpeg.md) ^8.0.0
- [postcss-prettify](https://npm.io/package/postcss-prettify.md) ^0.3.4
- [imagemin-pngquant](https://npm.io/package/imagemin-pngquant.md) ^8.0.0
- [@cedx/gulp-php-minify](https://npm.io/package/@cedx/gulp-php-minify.md) ^9.3.0

## Recent versions

- 0.1.26 (latest) — 2019-10-09
- 0.1.25 — 2019-09-03
- 0.1.24 — 2019-08-02
- 0.1.23 — 2019-06-20
- 0.1.22 — 2019-06-04
- 0.1.21 — 2019-05-13
- 0.1.20 — 2019-04-18
- 0.1.19 — 2019-04-18
- 0.1.18 — 2019-03-27
- 0.1.17 — 2019-02-27
- 0.1.15 — 2019-01-30
- 0.1.14 — 2019-01-29
- 0.1.13 — 2019-01-27
- 0.1.12 — 2019-01-09
- 0.1.11 — 2019-01-09
- … 7 more at https://npm.io/package/gulp4-tasks/versions

## README

# gulp4-tasks

## about

個人用gulp 4.0 タスク設定

## TASKS

### BrowserSync(base, port, directory)

```gulpfile.js
const tasks = require('gulp4-tasks')

const server = cb => {
  tasks.BrowserSync('./dev', 8080, true)
  cb()
}
exports.server = server
```

#### directory

https://www.browsersync.io/docs/options#option-server

default `false`

### Clean(path)

### CompileCoffee(src, dist)

### CompileMarkdown(src, dist[, options])

#### options

[markdown options](https://marked.js.org/#/USING_ADVANCED.md)

### CompilePug(src, dist[, options])

```gulpfile.js
const tasks = require('gulp4-tasks')

const opts = {
  pretty: true,
  locals: {
    moment: require('moment')
  },
  filters: {
    php: require('pug-php-filter')
  },
  ext: 'php'
}

const compilePug2Php = () => tasks.CompilePug('*.pug', 'path/dist', opts)
exports.compilePug2Php = compilePug2Php
```

#### options

##### pretty

bool

default `true`

##### locals

object

##### filters

object

##### ext

string

### CompileStylus(src, dist[, options])

```gulpfile.js
const tasks = require('gulp4-tasks')

const opts = {
  mqpack: true,
  minify: false,
  sort: true,
  prefix: true,
  removeComments: true
}

const createCss = () => tasks.CompileStylus('./*.styl', 'path/dist', opts)
exports.createCss = createCss
```

autoprefixer options -> https://github.com/browserslist/browserslist#readme

#### options

##### grid

bool, string

default `false`

##### mqpack

bool

default `false`


##### sort

bool

default `false`

##### prefix

bool

##### minify

bool

default `false`

##### removeComments

bool

default `true`

### Concat(src, dist, filename)

#### src

glob or array

### Copy(src, dist)

### MinifyImage(src, dist)

### MinifyJs(src, dist)

### MinifyPhp(src, dist)

### Open(urls)

### SvgStore(src, dist, filename)

### TemplateHeader(template, data, src, dist)

```gulpfile.js
const tasks = require('gulp4-tasks')

const template = `
/*
  Theme Name: <%= pkg.name %>
  Theme URI: <%= pkg.homepage %>
  Author: <%= pkg.author %>
  Author URI: <%= pkg.homepage %>
  Description: <%= pkg.description %>
  Version: <%= pkg.version %>
*/
`
const data = { pkg: require('./package.json') }
const createWPStyleSheet = () => tasks.TemplateHeader(template, data, 'style.css', 'path/dist')
exports.createWPStyleSheet = createWPStyleSheet
```

### Webpack(src, dist, config)

```gulpfile.js
const tasks = require('gulp4-tasks')

let config = require('./webpack.config')
const bundleJs = cb => {
  config.mode = 'development'
  config.devtool = 'source-map'
  config.output = { filename: 'bundle.js' }
  tasks.Webpack('path/js/src.js', 'path/dist', config)
  cb()
}
exports.bundleJs = bundleJs
```

---
_Source: https://npm.io/package/gulp4-tasks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
