# @pipflow/core

> Packaging of Gulp-based build tasks. It provides a series of out-of-the-box Gulp tasks.

Latest version **1.2.5** (published 2024-10-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pipflow/core
pnpm add @pipflow/core
yarn add @pipflow/core
bun add @pipflow/core
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

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

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.5 |
| Published | 2024-10-04 |
| First published | 2023-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16.0.0 |
| Dependencies | 42 |
| Unpacked size | 56.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mervin |
| Maintainers | mengqing723 |
| Keywords | gulp, gulp-task, gulp-build, gulp-workflow, gulp-plugins, gulp-webpack, gulp-html, gulp-css, gulp-postcss, gulp-template, workflow |

## Links

- npm: https://www.npmjs.com/package/@pipflow/core
- Repository: https://github.com/Meqn/pipflow
- Issues: https://github.com/Meqn/pipflow/issues
- npm.io page: https://npm.io/package/@pipflow/core

## Dependencies (42)

- [gulp](https://npm.io/package/gulp.md) ^4.0.2
- [sass](https://npm.io/package/sass.md) 1.77.2
- [vinyl](https://npm.io/package/vinyl.md) ^3.0.0
- [merge2](https://npm.io/package/merge2.md) ^1.4.1
- [rimraf](https://npm.io/package/rimraf.md) ^5.0.1
- [cssnano](https://npm.io/package/cssnano.md) ^7.0.6
- [gulp-hb](https://npm.io/package/gulp-hb.md) ^8.0.0
- [gulp-if](https://npm.io/package/gulp-if.md) ^3.0.0
- [postcss](https://npm.io/package/postcss.md) ^8.4.47
- [webpack](https://npm.io/package/webpack.md) ^5.88.1
- [gulp-ejs](https://npm.io/package/gulp-ejs.md) ^5.1.0
- [gulp-pug](https://npm.io/package/gulp-pug.md) ^5.0.0
- [gulp-rev](https://npm.io/package/gulp-rev.md) ^9.0.0
- [gulp-zip](https://npm.io/package/gulp-zip.md) ^5.1.0
- [through2](https://npm.io/package/through2.md) ^4.0.2
- [gulp-less](https://npm.io/package/gulp-less.md) ^5.0.0
- [gulp-sass](https://npm.io/package/gulp-sass.md) ^5.1.0
- [gulp-renew](https://npm.io/package/gulp-renew.md) ^1.0.1
- [gulp-concat](https://npm.io/package/gulp-concat.md) ^2.6.1
- [gulp-filter](https://npm.io/package/gulp-filter.md) ^7.0.0
- [gulp-header](https://npm.io/package/gulp-header.md) ^2.0.9
- [gulp-rename](https://npm.io/package/gulp-rename.md) ^2.0.0
- [gulp-stylus](https://npm.io/package/gulp-stylus.md) ^3.0.0
- [gulp-terser](https://npm.io/package/gulp-terser.md) ^2.1.0
- [vinyl-named](https://npm.io/package/vinyl-named.md) ^1.1.0
- [browser-sync](https://npm.io/package/browser-sync.md) ^2.29.3
- [gulp-art-tpl](https://npm.io/package/gulp-art-tpl.md) ^1.3.1
- [gulp-dataurl](https://npm.io/package/gulp-dataurl.md) ^1.2.1
- [gulp-plumber](https://npm.io/package/gulp-plumber.md) ^1.2.1
- [plugin-error](https://npm.io/package/plugin-error.md) ^2.0.1
- [gulp-nunjucks](https://npm.io/package/gulp-nunjucks.md) ^5.1.0
- [@pipflow/utils](https://npm.io/package/@pipflow/utils.md) ^1.1.2
- [webpack-stream](https://npm.io/package/webpack-stream.md) ^7.0.0
- [gulp-eslint-new](https://npm.io/package/gulp-eslint-new.md) ^2.3.0
- [gulp-sourcemaps](https://npm.io/package/gulp-sourcemaps.md) ^3.0.0
- [gulp-json-editor](https://npm.io/package/gulp-json-editor.md) ^2.5.6
- [gulp-rev-rewrite](https://npm.io/package/gulp-rev-rewrite.md) ^5.0.0
- [postcss-preset-env](https://npm.io/package/postcss-preset-env.md) ^10.0.0
- [postcss-load-config](https://npm.io/package/postcss-load-config.md) ^5.1.0
- [html-minifier-terser](https://npm.io/package/html-minifier-terser.md) ^7.2.0
- [string-replace-loader](https://npm.io/package/string-replace-loader.md) ^3.1.0
- [terser-webpack-plugin](https://npm.io/package/terser-webpack-plugin.md) ^5.3.9

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.2.5 (latest) — 2024-10-04
- 1.2.4 — 2024-09-29
- 1.2.3 — 2024-09-25
- 1.2.2 — 2024-09-24
- 1.2.1 — 2024-09-23
- 1.2.0 — 2024-09-20
- 1.1.4 — 2024-09-14
- 1.1.3 — 2024-09-13
- 1.1.2 — 2024-01-14
- 1.1.1 — 2024-01-03
- 1.1.0 — 2023-12-29
- 1.0.0 — 2023-12-28
- 0.13.0 — 2023-12-14
- 0.12.0 — 2023-11-03
- 0.11.0 — 2023-10-28
- … 19 more at https://npm.io/package/@pipflow/core/versions

## README

# @pipflow/core

> Packaging of Gulp-based build tasks.

It provides a series of out-of-the-box Gulp tasks , covering from HTML, CSS, Javascript to static resources , local servers , the entire front-end project build process , greatly simplifying and optimizing the Gulp configuration process .



基于Gulp构建任务的封装。

它提供了一系列开箱即用的 Gulp 任务, 涵盖从 HTML、CSS、Javascript 到静态资源、本地服务器的整个前端项目构建流程,极大地简化和优化了Gulp的配置过程。

## Install

```
npm install --save-dev @pipflow/core
```

## Usage

```js
// gulpfile.js

const gulp = require('gulp')
const {
  htmlTask,
  scriptTask,
  styleTask,
  imageTask,
  staticTask,
  copyTask,
  archiveTask,
  removeTask,
  userTask,
  eslintTask,
  createServer
} = require('@pipflow/core')

exports.buildHtml = done => {
  return htmlTask({
    input: 'src/**/*.{html,ejs}',
    compiler: 'ejs'
  }, done)
}

exports.buildScript = done => {
  return scriptTask({
    input: 'src/**/*.{js,mjs}',
    compiler: 'babel'
  }, done)
}

exports.buildStyle = done => {
  return styleTask({
    input: 'src/**/*.{css,less}',
    compiler: 'less'
  }, done)
}

// ...
```

## Task Options

```typescript
{
  /**
   * 指定任务入口文件
   * 
   * Specify the task entry
   */
  input: string | string[] | { [key: string]: string | string[] }

  /**
   * 指定任务输出路径
   * 
   * Specify output path.
   * @default 'dist/'
   */
  dest?: string

  /**
   * 显式地在创建的 Vinyl 对象上设置 base 属性
   * 
   * Explicitly set the base property on created Vinyl objects. 
   * @default './src'
   */
  base?: string

  /**
   * 转译工具
   * Compiler.
   */
  compiler?: string

  /**
   * 转译选项
   * Compiler Configuration.
   */
  compilerOptions?: Object<string, any>

  /**
   * 是否开始最小化混淆/压缩 或 配置项
   * 
   * Whether Minimize/compression or Configuration.
   */
  minify?: boolean | Object<string, any>

  /**
   * 自定义任务处理流程
   * 
   * Customize task processing flow
   */
  plugins?: ((...args: any[]) => NodeJS.ReadWriteStream)[]

  /**
   * 文件哈希和版本控制
   * 
   * File hashing and version control.
   */
  fileHash?: boolean | '?' | '-'

  /**
   * 生成 source map 文件
   * 
   * Whether to generate source map.
   */
  sourcemap?: boolean | 'inline'

  /**
   * 字符串别名替换
   * 
   * alias replacement.
   */
  alias?: { [key: string]: string }
}
```

## Documents 📚

[Read the Docs to Learn More.](https://pipflow.mengqing.org/guide/task.html)

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