<commit_before>[![Build Status](https://travis-ci.org/Orbitale/Gulpfile.svg)](https://travis-ci.org/Orbitale/Gulpfile)

# Base Gulpfile

This is a sample of Gulpfile to be used with config instead of "re-developing" manually each gulpfile.

## Requirements

* NodeJS 4+

## What it does provide

* Options:
  *     `--prod`       If specified, will run clean-css and uglyfyjs when dumping the assets.
* Gulp commands:
  *     `images`       Dumps the sources in the `config.images` parameter from image files.
  *     `less`         Dumps the sources in the `config.less` parameter from LESS files.
  *     `sass`         Dumps the sources in the `config.sass` parameter from SCSS files.
  *     `css`          Dumps the sources in the `config.css` parameter from plain CSS files.
  *     `js`           Dumps the sources in the `config.js` parameter from plain JS files.
  *     `dump`         Executes all the above commands.
  *     `watch`        Executes `dump`, then watches all sources, and dump all assets once any file
  is updated.
* Logs: when you run a command, there are plenty of `console` calls that log things that happen,
 which allow you to know what is happening, what files are managed, updated. All with time info.

## Install

### By copy/pasting

* Copy/paste the `gulpfile.js` and the `package.json` files in the root directory of your project
(or execute the command below).
* Run `npm install && npm shrinkwrap` command
 * [What is `shrinkwrap`?](https://docs.npmjs.com/cli/shrinkwrap)
   It's something you **should** use more often.
* Update the `config` variable in the `gulpfile.js` file so it fits to your needs.
* To view how this gulpfile works, simply run `gulp default` or `gulp` without any argument.
* Enjoy!

### With a simple bash script

Or execute these commands in your project's root:

```bash
curl -LOk https://raw.githubusercontent.com/Orbitale/Gulpfile/master/gulpfile.js -o gulpfile.js
curl -LOk https://raw.githubusercontent.com/Orbitale/Gulpfile/master/package.json -o package.json
npm install<commit_msg>Update readme after gulp4 config<commit_after>[![Build Status](https://travis-ci.org/Orbitale/Gulpfile.svg?branch=gulp4)](https://travis-ci.org/Orbitale/Gulpfile)

# Base Gulpfile

This is a sample of Gulpfile to be used with config instead of "re-developing" manually each gulpfile.

⚠️ You are looking at the version using Gulp 3. This version is stable, but old, and Gulp 4 is coming!
If you want to look at the version using Gulp 4, [go there](https://github.com/Orbitale/Gulpfile/tree/gulp4).

## Requirements

* NodeJS 4+
* NPM if you don't have choice, Yarn instead (recommended).
* Gulp 3

## What it does provide

* Options:
  * `--prod`       If specified, will run clean-css and uglyfyjs when dumping the assets.
* Gulp commands:
  * `images`       Dumps the sources in the `config.images` parameter from image files.
  * `less`         Dumps the sources in the `config.less` parameter from LESS files.
  * `sass`         Dumps the sources in the `config.sass` parameter from SCSS files.
  * `css`          Dumps the sources in the `config.css` parameter from plain CSS files.
  * `js`           Dumps the sources in the `config.js` parameter from plain JS files.
  * `dump`         Executes all the above commands.
  * `watch`        Executes `dump`, then watches all sources, and dump all assets once any file
  is updated.
* Logs: when you run a command, there are plenty of `console` calls that log things that happen,
 which allow you to know what is happening, what files are managed, updated. All with time info.

## Install

### By copy/pasting

* Copy/paste the `gulpfile.js` and the `package.json` files in the root directory of your project
(or execute the command below).
* Install dependencies:
    * Choice 1: Run `npm install && npm shrinkwrap` command
       * [What is `shrinkwrap`?](https://docs.npmjs.com/cli/shrinkwrap)
        It's something you **should** use more often if you use `npm`.
    * Choice 2: Run `yarn install` command, and a `yarn.lock` will magically appear
* Update the `config` variable in the `gulpfile.js` file so it fits to your needs.
* To view how this gulpfile works, simply run `gulp default` or `gulp` without any argument.
* Enjoy!

### With a simple bash script

Or execute these commands in your project's root:

```bash
curl -LOk https://raw.githubusercontent.com/Orbitale/Gulpfile/master/gulpfile.js -o gulpfile.js
curl -LOk https://raw.githubusercontent.com/Orbitale/Gulpfile/master/package.json -o package.json
npm install
{'fraction_non_alphanumeric': 0.09733538868090728, 'fraction_numerical': 0.002422373926447919, 'mean_word_length': 3.439882697947214, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 11, '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': '695685', 'n_tokens_mistral': 1411, 'n_tokens_neox': 1367, 'n_words': 568}