<commit_before># csstime-gulp-tasks

[![Join the chat at https://gitter.im/csstime/csstime-gulp-tasks](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/csstime/csstime-gulp-tasks?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Prepared Gulp tasks to build and optimize assets of your project (LESS, CSS, SVG, images, sprites and more).

```
npm install csstime-gulp-tasks
```

List of used packages:
* autoprefixer-core,
* gulp-concat,
* gulp-csscomb,
* gulp-csso,
* gulp-header,
* gulp-imagemin,
* gulp-less,
* gulp-postcss,
* gulp-svg2png,
* gulp-uglify,
* gulp.spritesmith,
* node-notifier,
* normalize.css,
* pleeease-filters,
* postcss-opacity.

If your project has following structure you can use these tasks or some of them.
You component.json should has "name" of component.

```
gulpfile.js
static/ #always stored in a repository
├──favicon.ico
├──robots.txt
└──...
src/ #source directory
└──components/
	└──document/
		├──component.json
		└──assets
			├──other/
			├──fonts/
			├──images/
			├──sprites/
			└──less/
				└──styles.less
			└──svg/
	└──componentA/
		├──component.json
		└──assets
			├──sprites/
			└──less/
				└──styles.less
			└──svg/
	└──componentB/
		├──component.json
		└──assets
			└──css/
				└──styles.css
```

Just write this in your Gulpfile.js:
```javascript
'use strict';

var gulp = require('gulp'),
    config = {}, // custom config
    csstime = require('csstime-gulp-tasks');

config.useNormalizeCss = true; // custom configuration
csstime.loadGulpTasks(gulp, config);
```

You can pass custom config in `csstime.loadGulpTasks(gulp, config);` to override default params.
Learn more about default params in [configs documentation](/doc/configs.md).

Here is high level available tasks which you can see after `gulp --tasks`:

| Name						| Action																		|
|---------------------------|-------------------------------------------------------------------------------|
| `csstime-mode-release`	| Build, optimize and minify all assets. Remove temporary files.				|
| `csstime-mode-debug`		| Collect and build assets. You can analyze temporary files.					|
| `csstime-mode-watch`		| Watch changing files and run in debug mode									|
| `csstime-exec-csscomb`	| Execute csscomb																|
| `csstime-clean`			| Clear destination directory													|

Learn more about all tasks in [tasks documentation](/doc/tasks.md).

After `csstime-mode-release` you will get following structure:
```
gulpfile.js
static/ #without changes
src/ #without changes
build/ #all generated files here
	├──favicon.ico
    ├──robots.txt
    ├──...
	├──styles.css
	└──components/
		├──sprites.png
		└──document/ #without less, css, sprites
			├──other/
			├──fonts/
			├──images/
			└──svg/
		└──componentA/
			└──svg/

```

Learn how to migrate to version 4 [here](/doc/migrations.md).<commit_msg>Update docs<commit_after># csstime-gulp-tasks

[![Join the chat at https://gitter.im/csstime/csstime-gulp-tasks](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/csstime/csstime-gulp-tasks?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Prepared Gulp tasks to build and optimize assets of your project (LESS, CSS, SVG, images, sprites and more).

```
npm install csstime-gulp-tasks
```

List of used packages:
* autoprefixer-core,
* gulp-concat,
* gulp-csscomb,
* gulp-csso,
* gulp-header,
* gulp-imagemin,
* gulp-less,
* gulp-postcss,
* gulp-svg2png,
* gulp-uglify,
* gulp.spritesmith,
* node-notifier,
* normalize.css,
* pleeease-filters,
* postcss-opacity.

If your project has following structure you can use these tasks or some of them.
You component.json should has "name" of component.

```
gulpfile.js
static/ #always stored in a repository
├──favicon.ico
├──robots.txt
└──...
src/ #source directory
└──components/
	└──document/
		├──component.json
		└──assets
			├──other/
			├──fonts/
			├──images/
			├──sprites/
			└──less/
				└──themes/
					└──mobile.less
				└──styles.less
			└──svg/
	└──componentA/
		├──component.json
		└──assets
			├──sprites/
			└──less/
				└──themes/
					└──mobile.less
				└──styles.less
			└──svg/
	└──componentB/
		├──component.json
		└──assets
			└──css/
				└──styles.css
```

Just write this in your Gulpfile.js:
```javascript
'use strict';

var gulp = require('gulp'),
    config = {}, // custom config
    csstime = require('csstime-gulp-tasks');

config.useNormalizeCss = true; // custom configuration
config.themedStylesFileNames = ['mobile']; // separated themes
csstime.loadGulpTasks(gulp, config);
```

You can pass custom config in `csstime.loadGulpTasks(gulp, config);` to override default params.
Learn more about default params in [configs documentation](/doc/configs.md).

Here is high level available tasks which you can see after `gulp --tasks`:

| Name						| Action																		|
|---------------------------|-------------------------------------------------------------------------------|
| `csstime-mode-release`	| Build, optimize and minify all assets. Remove temporary files.				|
| `csstime-mode-debug`		| Collect and build assets. You can analyze temporary files.					|
| `csstime-mode-watch`		| Watch changing files and run in debug mode									|
| `csstime-exec-csscomb`	| Execute csscomb																|
| `csstime-clean`			| Clear destination directory													|

Learn more about all tasks in [tasks documentation](/doc/tasks.md).

After `csstime-mode-release` you will get following structure:
```
gulpfile.js
static/ #without changes
src/ #without changes
build/ #all generated files here
	├──favicon.ico
    ├──robots.txt
    ├──...
	├──styles.css
	├──mobile.css
	└──components/
		├──sprites.png
		└──document/ #without less, css, sprites
			├──other/
			├──fonts/
			├──images/
			└──svg/
		└──componentA/
			└──svg/

```

Learn how to migrate to version 4 [here](/doc/migrations.md).
{'fraction_non_alphanumeric': 0.1858843537414966, 'fraction_numerical': 0.0013605442176870747, 'mean_word_length': 2.9898236092265944, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '5052020', 'n_tokens_mistral': 2307, 'n_tokens_neox': 2107, 'n_words': 511}