# @cluejs/gulp-env

> Enviroment helper for gulp (not only, really) tasks

Latest version **1.2.0** (published 2017-09-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install @cluejs/gulp-env
pnpm add @cluejs/gulp-env
yarn add @cluejs/gulp-env
bun add @cluejs/gulp-env
```

## 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.2.0 |
| Published | 2017-09-25 |
| First published | 2017-09-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | demian_dark |
| Maintainers | demian_dark |

## Links

- npm: https://www.npmjs.com/package/@cluejs/gulp-env
- Repository: https://github.com/cluejs/gulp-env
- Homepage: https://github.com/cluejs/gulp-env#readme
- Issues: https://github.com/cluejs/gulp-env/issues
- npm.io page: https://npm.io/package/@cluejs/gulp-env

## Dependencies (1)

- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.8

## Recent versions

- 1.2.0 (latest) — 2017-09-25
- 1.0.2 — 2017-09-25
- 1.0.1 — 2017-09-25

## README

# gulp-env

## Checkers:
- `.isProduction()`
- `.isDevelopment()`

## Setters:
- `.setProduction()`
- `.setDevelopment()`

## Usage:

```javascript
global.$$ = {};

$$.env = require('@cluejs/gulp-env');
$$.gulp_error_handler = require('@cluejs/gulp-error-handler');

gulp.task('watch', (callback) => {
    
    $$.env.setDevelopment();
    
    // code
    callback()
})

gulp.task('build:css', () => {
    return gulp.src(['**/**/*.css'], {cwd: './src/sass'})
        .pipe($$.gulp_error_handler({exitOnError: $$.env.isProduction()}))
        .pipe(require('gulp-if')($$.env.isDevelopment(), require('gulp-changed')('./dest/css', {extension: '.css'})))
})

```
####

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