# ray-gulp-toolkit

> compile toolkit

Latest version **1.0.6** (published 2025-12-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install ray-gulp-toolkit
pnpm add ray-gulp-toolkit
yarn add ray-gulp-toolkit
bun add ray-gulp-toolkit
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

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

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2025-12-29 |
| First published | 2021-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ilex.h |
| Maintainers | ilex.h |

## Links

- npm: https://www.npmjs.com/package/ray-gulp-toolkit
- npm.io page: https://npm.io/package/ray-gulp-toolkit

## Dependencies (8)

- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [terser](https://npm.io/package/terser.md) ^5.4.0
- [through2](https://npm.io/package/through2.md) ^2.0.5
- [plugin-error](https://npm.io/package/plugin-error.md) ^1.0.1
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.13.10
- [gulp-displaylog](https://npm.io/package/gulp-displaylog.md) ^1.0.3
- [gulp-jsbeautifier](https://npm.io/package/gulp-jsbeautifier.md) ^3.0.1
- [vinyl-sourcemaps-apply](https://npm.io/package/vinyl-sourcemaps-apply.md) ^0.2.1

## Recent versions

- 1.0.6 (latest) — 2025-12-29
- 1.0.5 — 2023-06-02
- 1.0.4 — 2021-05-19
- 1.0.3 — 2021-03-15
- 1.0.2 — 2021-03-15
- 1.0.1 — 2021-03-15
- 1.0.0 — 2021-03-15

## README

# ray-gulp-toolkit

## author

ilex.h

## 描述 descr

常用的 gulp 插件、及基本配置

## Install

```bash
npm install -save ray-gulp-toolkit
```

## Usage

### use module

```js
import {
  shy,
  kneel,
  naughty,
  logger,
  LOG
} from 'ray-gulp-toolkit';

// logger gulp log
// LOG print info
```

### use plugins

#### terser

[terser#minify-options](https://github.com/terser-js/terser#minify-options)

```js
import terser from 'ray-gulp-toolkit/lib/plugins/terser';

function babel(){
  return gulp.src('./src/index.js')
    .pipe(terser())
    .pipe(gulp.dest('./lib'));
}

// options
function babel(){
  return gulp.src('./src/index.js')
    .pipe(terser({
      mangle: false,
      output: {
        beautify: true
      }
    }))
    .pipe(gulp.dest('./lib'));
}

// second args
import { minify } from 'terser';

function babel(){
  return gulp.src('./src/index.js')
    .pipe(terser({}, minify))
    .pipe(gulp.dest('./lib'));
}

// source map
import sourcemaps from 'gulp-sourcemaps';

function babel(){
  return gulp.src('./src/index.js')
    .pipe(sourcemaps.init())
    .pipe(terser())
    .pipe(sourcemaps.write('./'))
    .pipe(gulp.dest('./lib'));
}
```

#### prettify

```js
import terser from 'ray-gulp-toolkit/lib/plugins/terser';
import prettify from 'ray-gulp-toolkit/lib/plugins/prettify';

function babel(){
  return gulp.src('./src/index.js')
    .pipe(terser())
    .pipe(prettify())
    .pipe(gulp.dest('./lib'));
}
```

## Lecense

MIT

## changelog

* 2021-3-15 add gulp config、plugin v1.0.0
* 2017-5-21 init

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