<commit_before># gulp package management helper

## Features

1. Smart package-require notation
2. Add 'install' task to your gulpfile
3. Add 'uninstall' task to your gulpfile

## Install

```sh
$ npm install gulp-packages
```

## Features1: Smart package-require notation

### BEFORE

__gulpfile.js__

```js
var gulp = require('gulp');
var less = require('gulp-less');
var coffee = require('gulp-coffee');
var pleeease = require('gulp-pleeease');
var minifyCss = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var watch = require('gulp-watch');
var plumber = require('gulp-plumber');
var coffeelint = require('gulp-coffeelint');
var concat = require('gulp-concat');
```

### AFTER

__gulpfile.js__

```js
var gulp = require('gulp');
var pkg = require('gulp-packages')(gulp, [
  'less',
  'coffee',
  'pleeease',
  'minifyCss',
  'uglify',
  'rename',
  'watch',
  'plumber',
  'coffeelint',
  'concat'
]);
```

For the above example, Packages are loaded into `pkg` variable.

#### Use of loaded packages

```js
gulp.src('/path/to/*.coffee')
  .pipe(pkg.plumber())  // <-
  .pipe(pkg.coffee())   // <- pkg.XXX(package name)
  .pipe(pkg.uglify())   // <-
  .pipe(gulp.dest('js/'));
```

## Features2: Add 'install' task to your gulpfile

When the following conditions:

__gulpfile.js__

```js
var gulp = require('gulp');
var pkg = require('gulp-packages')(gulp, [
  'less',
  'coffee',
  'pleeease',
  'minifyCss',
  'uglify',      // <- not installed yet
  'rename',      // <- not installed yet 
  'watch',
  'plumber',     // <- not installed yet
  'coffeelint',
  'concat'       // <- not installed yet
]);
```

### BEFORE

```sh
$ npm install gulp-uglify gulp-rename gulp-plumber gulp-concat --save-dev
```

### AFTER

```sh
$ gulp install
```

## Features3: Add 'uninstall' task to your gulpfile

When the following conditions:

__gulpfile.js__

```js
var gulp = require('gulp');
var pkg = require('gulp-packages')(gulp, [
  'less',
  'coffee',
  'pleeease',
  'minifyCss',
  'watch',
  'coffeelint',
]);
```

and

__package.json__

```json:package.json
{
  "devDependencies": {
    "coffee-script": "*",
    "gulp": "*",
    "gulp-coffee": "^2.1.1",
    "gulp-coffeelint": "^0.3.3",
    "gulp-concat": "^2.3.4",      // <- no longer using
    "gulp-less": "^1.3.2",
    "gulp-minify-css": "^0.3.7",
    "gulp-pleeease": "0.0.5",
    "gulp-plumber": "^0.6.4",     // <- no longer using
    "gulp-rename": "^1.2.0",      // <- no longer using
    "gulp-uglify": "^0.3.1",      // <- no longer using
    "gulp-watch": "^0.6.8"
  }
}
```

### BEFORE

```sh
$ npm uninstall gulp-uglify gulp-rename gulp-plumber gulp-concat --save-dev
```

### AFTER

```sh
$ gulp uninstall
```
<commit_msg>add package rule to README.md<commit_after># gulp package management helper

## Features

1. Smart package-require notation
2. Add 'install' task to your gulpfile
3. Add 'uninstall' task to your gulpfile

## Install

```sh
$ npm install gulp-packages
```

## Features1: Smart package-require notation

### BEFORE

__gulpfile.js__

```js
var gulp = require('gulp');
var less = require('gulp-less');
var coffee = require('gulp-coffee');
var pleeease = require('gulp-pleeease');
var minifyCss = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var watch = require('gulp-watch');
var plumber = require('gulp-plumber');
var coffeelint = require('gulp-coffeelint');
var concat = require('gulp-concat');
```

### AFTER

__gulpfile.js__

```js
var gulp = require('gulp');
var pkg = require('gulp-packages')(gulp, [
  'less',
  'coffee',
  'pleeease',
  'minifyCss',
  'uglify',
  'rename',
  'watch',
  'plumber',
  'coffeelint',
  'concat'
]);
```

For the above example, Packages are loaded into `pkg` variable.

#### Use of loaded packages

```js
gulp.src('/path/to/*.coffee')
  .pipe(pkg.plumber())  // <-
  .pipe(pkg.coffee())   // <- pkg.XXX(package name)
  .pipe(pkg.uglify())   // <-
  .pipe(gulp.dest('js/'));
```

## Features2: Add 'install' task to your gulpfile

When the following conditions:

__gulpfile.js__

```js
var gulp = require('gulp');
var pkg = require('gulp-packages')(gulp, [
  'less',
  'coffee',
  'pleeease',
  'minifyCss',
  'uglify',      // <- not installed yet
  'rename',      // <- not installed yet 
  'watch',
  'plumber',     // <- not installed yet
  'coffeelint',
  'concat'       // <- not installed yet
]);
```

### BEFORE

```sh
$ npm install gulp-uglify gulp-rename gulp-plumber gulp-concat --save-dev
```

### AFTER

```sh
$ gulp install
```

## Features3: Add 'uninstall' task to your gulpfile

When the following conditions:

__gulpfile.js__

```js
var gulp = require('gulp');
var pkg = require('gulp-packages')(gulp, [
  'less',
  'coffee',
  'pleeease',
  'minifyCss',
  'watch',
  'coffeelint',
]);
```

and

__package.json__

```json:package.json
{
  "devDependencies": {
    "coffee-script": "*",
    "gulp": "*",
    "gulp-coffee": "^2.1.1",
    "gulp-coffeelint": "^0.3.3",
    "gulp-concat": "^2.3.4",      // <- no longer using
    "gulp-less": "^1.3.2",
    "gulp-minify-css": "^0.3.7",
    "gulp-pleeease": "0.0.5",
    "gulp-plumber": "^0.6.4",     // <- no longer using
    "gulp-rename": "^1.2.0",      // <- no longer using
    "gulp-uglify": "^0.3.1",      // <- no longer using
    "gulp-watch": "^0.6.8"
  }
}
```

### BEFORE

```sh
$ npm uninstall gulp-uglify gulp-rename gulp-plumber gulp-concat --save-dev
```

### AFTER

```sh
$ gulp uninstall
```

## Package name rule

1. Remove 'gulp-'
2. Convert to camel case

### Example

* gulp-uglify -> 'uglify'
* gulp-minify-css -> 'minifyCss'

{'fraction_non_alphanumeric': 0.20407440212577502, 'fraction_numerical': 0.013108945969884853, 'mean_word_length': 3.3430769230769233, 'pattern_counts': {'":': 26, '<': 25, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1706985', 'n_tokens_mistral': 2335, 'n_tokens_neox': 2200, 'n_words': 500}