# gulp-confidence

> a gulp plugin for confidenceJS

Latest version **0.0.1** (published 2014-10-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-confidence
pnpm add gulp-confidence
yarn add gulp-confidence
bun add gulp-confidence
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2014-10-29 |
| First published | 2014-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kingles |
| Maintainers | kingles |

## Links

- npm: https://www.npmjs.com/package/gulp-confidence
- Repository: https://github.com/asilluron/gulp-confidence
- Issues: https://github.com/asilluron/gulp-confidence/issues
- npm.io page: https://npm.io/package/gulp-confidence

## Dependencies (5)

- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [through2](https://npm.io/package/through2.md) ^0.6.3
- [gulp-data](https://npm.io/package/gulp-data.md) ^1.0.2
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.1
- [confidence](https://npm.io/package/confidence.md) ^1.0.0

## Recent versions

- 0.0.1 (latest) — 2014-10-29
- 0.0.0 — 2014-10-29

## README

gulp-confidence
===============

Confidence JSON plugin for GulpJS

# [gulp](http://gulpjs.com)-confidence [![Build Status](https://travis-ci.org/Kingles/gulp-confidence.svg?branch=master)](https://travis-ci.org/Kingles/gulp-confidence)

> retreive parameterized [confidence](https://github.com/hapijs/confidence) documents using gulp.


*Issues with the output should be reported on the confidence [issue tracker](https://github.com/hapijs/confidence).*


## Install

```sh
$ npm install --save-dev gulp-confidence
```


## Usage

### `config/base.config.json`

```json
{
	"hello":{
		"$filter": "place"
		"world": "Hello World",
		"$default": "Hello Mars"
	}
}
```

### `gulpfile.js`

```js
var gulp = require('gulp');
var confidence = require('gulp-confidence');

gulp.task('default', function () {
	return gulp.src('config/base.config.json')
		.pipe(confidence({place: "world"}))
		.pipe(gulp.dest('dist'));
});
```

### `dist/base.config.json`
```json
{
	"hello": "Hello World"
}
```


You can alternatively use [gulp-data](https://github.com/colynb/gulp-data) to inject the data:

### `gulpfile.js`
```js
var gulp = require('gulp');
var confidence = require('gulp-confidence');
var data = require('gulp-data');

gulp.task('default', function () {
	return gulp.src('src/greeting.html')
		.pipe(data(function () {
			return {place: "world"};
		}))
		.pipe(confidence())
		.pipe(gulp.dest('dist'));
});
```

### `dist/base.config.json`
```json
{
	"hello": "Hello World"
}
```


## API

See the [Confidence `Store` docs](https://github.com/hapijs/confidence#confidencestore).

### confidence(data, options)

#### data

Type: `Object`

The [criteria](https://github.com/hapijs/confidence#storegetkey-criteria) object used to populate the text.

#### options

Type: `Object`

Currently just supports a "key" key, that allows you to specify the key used in the [`get()` command](https://github.com/hapijs/confidence#storegetkey-criteria)


## Notes

If you use [grunt](http://gruntjs.com) instead of gulp, but want to perform a similar task, use [grunt-confidence](https://github.com/asilluron/grunt-confidence).


## License

MIT

## Contributors
[Jeromy Malige(Kingles)](http://github.com/kingles)

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