# gulpury

> Nice Module to Create Your Gulp Build-System Quick, Easy & Nifty!

Latest version **1.4.0** (published 2017-07-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulpury
pnpm add gulpury
yarn add gulpury
bun add gulpury
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2017-07-20 |
| First published | 2017-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Yaser Khahani |
| Maintainers | yaserkh |
| Keywords | gulp, build, stream, minify, concat, uglify, gzip, html_replace, replace, rename, sass |

## Links

- npm: https://www.npmjs.com/package/gulpury
- Repository: https://github.com/ykh/gulpury
- Issues: https://github.com/ykh/gulpury/issues
- npm.io page: https://npm.io/package/gulpury

## Dependencies (13)

- [del](https://npm.io/package/del.md) ^2.2.2
- [gulp-gzip](https://npm.io/package/gulp-gzip.md) ^1.4.0
- [gulp-sass](https://npm.io/package/gulp-sass.md) ^3.1.0
- [gulp-clone](https://npm.io/package/gulp-clone.md) ^1.0.0
- [gulp-concat](https://npm.io/package/gulp-concat.md) ^2.6.1
- [gulp-rename](https://npm.io/package/gulp-rename.md) ^1.2.2
- [gulp-uglify](https://npm.io/package/gulp-uglify.md) ^2.0.1
- [event-stream](https://npm.io/package/event-stream.md) ^3.3.4
- [gulp-replace](https://npm.io/package/gulp-replace.md) ^0.5.4
- [run-sequence](https://npm.io/package/run-sequence.md) ^1.2.2
- [gulp-clean-css](https://npm.io/package/gulp-clean-css.md) ^2.3.2
- [gulp-sourcemaps](https://npm.io/package/gulp-sourcemaps.md) ^2.4.1
- [gulp-html-replace](https://npm.io/package/gulp-html-replace.md) ^1.6.2

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.4.0 (latest) — 2017-07-20
- 1.3.1 — 2017-07-20
- 1.2.0 — 2017-02-27
- 1.1.5 — 2017-02-23
- 1.1.3 — 2017-02-23
- 1.1.2 — 2017-02-20
- 1.1.1 — 2017-02-20
- 1.1.0 — 2017-02-20
- 1.0.1 — 2017-02-20
- 1.0.0 — 2017-02-06

## README

# gulpury

**Gulpury is a [Gulp](https://github.com/gulpjs/gulp) plugin that helps you to write your tasks quick.**

## Gulpury as a Wrapper Provides these Kind of Jobs

- Copy Sources to Destination.
- Compile Your SASS Files to CSS ([gulp-sass](https://github.com/dlmanning/gulp-sass)).
- Minify Your CSS Files ([gulp-clean-css](https://github.com/scniro/gulp-clean-css)).
- Minify/Uglify Your JS Files ([gulp-uglify](https://github.com/terinjokes/gulp-uglify)).
- Concat Files ([gulp-concat](https://github.com/contra/gulp-concat)).
- Rename Files ([gulp-rename](https://github.com/hparra/gulp-rename)).
- GZip Files ([gulp-gzip](https://github.com/jstuckey/gulp-gzip)).
- Replace String with another String in Your Text Files ([gulp-replace](https://github.com/lazd/gulp-replace)).
- Replace Block of String in Your Text Files ([gulp-html-replace](https://github.com/VFK/gulp-html-replace)).

## List of Plugins

```json
{
    "gulp-clean-css": "^2.3.2", 
    "gulp-concat": "^2.6.1",
    "gulp-gzip": "^1.4.0",
    "gulp-html-replace": "^1.6.2",
    "gulp-rename": "^1.2.2",
    "gulp-replace": "^0.5.4",
    "gulp-sass": "^3.1.0",
    "gulp-uglify": "^2.0.1"
}
```

## Install

```
npm install --save-dev gulpury
```

## Basic Usage
```js
var gulp = require('gulp');
var gulpury = require('gulpury');

// When You Want Copy some Sources to another Directory.
gulpury.add('i-want-copy-these', gulpury.TYPES.COPY, {
    src: [
        './src/*.html',
        './src/img/**'
    ],
    dest: './dist',
    base: './src'
});

// When You Want Replace Some Text in Your Text Files such as HTML Files.
gulpury.add('replace-version-with', gulpury.TYPES.COPY, {
    src: [
        './src/index.html',
        './src/layout.html'
    ],
    dest: './dist',
    params: {
        replace: [
            ['%version-js%', '1.0.0'],
            ['%version-css%', '0.1.0']
        ]
    }
});

// When You Want Compress some Files in GZip.
gulpury.add('oh-gzip', gulpury.TYPES.COPY, {
    src: [
        './src/assets/css/theme.min.css'
    ],
    dest: './dist/assets/css',
    params: {
        gzip: true
    }
});

// When You Want Compile/Minify/GZip Your SASS Files.
gulpury.add('css-from-sass', gulpury.TYPES.CSS, {
    src: [
        './src/assets/sass/style.scss'
    ],
    dest: './dist/assets/css',
    params: {
        sass: true,
        min: 'style.min.css',
        gzip: true
    }
});

// When You Want only Watch on Some Sources.
gulpury.add('watch-me', gulpury.TYPES.WATCH, {
    src: [
        './src/assets/sass/_common.scss'
    ]
});

// When You Want Uglify/GZip Your JS Files.
gulpury.add('hot-js', gulpury.TYPES.JS, {
    src: [
        './src/assets2/js/script.js'
    ],
    dest: './dist/assets2/js',
    params: {
        min: 'script.min.js',
        gzip: true
    }
});

/**
 * Run All Gulpury Assets with Type COPY.
 */
gulp.task('copy', function () {
    return gulpury.runByType(gulpury.TYPES.COPY);
});

/**
 * Watch All Sources in Gulpury Assets with Type COPY.
 */
gulp.task('copy:watch', ['copy'], function () {
    gulpury.watchByType(gulpury.TYPES.COPY, ['copy']);
});

/**
 * Run All Gulpury Assets with Type CSS.
 */
gulp.task('css', function () {
    return gulpury.runByType('css');
});

/**
 *
 */
gulp.task('css:watch', ['css'], function () {
   gulpury.watchByType(gulpury.TYPES.CSS, ['css']);
   gulpury.watchById('watch-me', ['css']);
});

/**
 * Run Gulpury Asset with Id 'hot-js'.
 */
gulp.task('js', function () {
    return gulpury.runById('hot-js');
});

/**
 * Watch Gulpury Assets with Id 'hot-js'
 */
gulp.task('js:watch', ['js'], function () {
    gulpury.watchById('hot-js', ['js']);
});
```

## Options

**All Asset TYPES:**

- ASSET_TYPES.WATCH
- ASSET_TYPES.COPY
- ASSET_TYPES.CSS
- ASSET_TYPES.JS

**Asset Params**
```js
var params = {
    src: 'sources',
    dest: 'destination-directory',
    base: 'base-directory',
    params: {
        sass: true, // Default Is False.
        rename: 'file-new-name', // e.g: style.min.css
        min: true, // Default Is False.
        gzip: true, // Default Is False.
        htmlReplace: { // According to gulp-html-replace Doc.
            'css1block': 'css/plugins.min.css?2.19',
            'css2block': 'css/style.min.css?2.19'
        },
        replace: [ // You Can Define Multiple Replacements.
           ['%placeholder1%', 'text1'],
           ['##placeholder2##', 'text2'],
           ['REPLACE_ME', 'text3']
        ]
    }
};
```

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