# gulp-standard-bundle

> Gulp plugin for checking code with 'standard' and formatting code with 'standard-format'

Latest version **0.2.6** (published 2016-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-standard-bundle
pnpm add gulp-standard-bundle
yarn add gulp-standard-bundle
bun add gulp-standard-bundle
```

## 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.2.6 |
| Published | 2016-09-25 |
| First published | 2016-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | ggarciao |
| Maintainers | ggarciao |
| Keywords | standard, format, standard format, standard-format, gulp, plugin, gulp plugin, gulp-plugin, gulpplugin |

## Links

- npm: https://www.npmjs.com/package/gulp-standard-bundle
- Repository: https://github.com/ggarciao/gulp-standard-bundle
- Issues: https://github.com/ggarciao/gulp-standard-bundle/issues
- npm.io page: https://npm.io/package/gulp-standard-bundle

## Dependencies (8)

- [colors](https://npm.io/package/colors.md) ^1.1.2
- [lodash](https://npm.io/package/lodash.md) ^4.16.1
- [standard](https://npm.io/package/standard.md) ^8.1.0
- [through2](https://npm.io/package/through2.md) ^2.0.1
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.7
- [log-symbols](https://npm.io/package/log-symbols.md) ^1.0.2
- [app-root-path](https://npm.io/package/app-root-path.md) ^2.0.1
- [standard-format](https://npm.io/package/standard-format.md) ^2.2.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.2.6 (latest) — 2016-09-25
- 0.2.5 — 2016-09-25
- 0.2.4 — 2016-09-24
- 0.2.3 — 2016-09-24

## README

#gulp-standard-bundle


> Linter for gulp that use the given [standard](https://github.com/feross/standard/) instance (or use the supported one as default) and format the code with a given [standard-format](https://github.com/maxogden/standard-format) instance (or use the supported one as default)

[![NPM](https://nodei.co/npm/gulp-standard-bundle.png)](https://nodei.co/npm/gulp-standard-bundle/)

[![Build Status](https://travis-ci.org/ggarciao/gulp-standard-bundle.svg?branch=master)](https://travis-ci.org/ggarciao/gulp-standard-bundle)
[![Coverage Status](https://coveralls.io/repos/github/ggarciao/gulp-standard-bundle/badge.svg?branch=master)](https://coveralls.io/github/ggarciao/gulp-standard-bundle?branch=master)
[![bitHound Overall Score](https://www.bithound.io/github/ggarciao/gulp-standard-bundle/badges/score.svg)](https://www.bithound.io/github/ggarciao/gulp-standard-bundle)
[![bitHound Dependencies](https://www.bithound.io/github/ggarciao/gulp-standard-bundle/badges/dependencies.svg)](https://www.bithound.io/github/ggarciao/gulp-standard-bundle/master/dependencies/npm)
[![bitHound Dev Dependencies](https://www.bithound.io/github/ggarciao/gulp-standard-bundle/badges/devDependencies.svg)](https://www.bithound.io/github/ggarciao/gulp-standard-bundle/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/ggarciao/gulp-standard-bundle/badges/code.svg)](https://www.bithound.io/github/ggarciao/gulp-standard-bundle)

## Information
Created to support the usage of [standard](https://github.com/feross/standard/) and [standard-format](https://github.com/maxogden/standard-format) with gulp (fork of [gulp-standard](https://www.npmjs.com/package/gulp-standard) to include the formatter)

## Usage

#### Install

```sh
$ npm install --save-dev gulp-standard-bundle
```

## Linter examples (standard)

Using the 'default' standard version (check package dependencies)
```javascript
var gulp = require('gulp')
var linter = require('gulp-standard-bundle').linter

gulp.task('lint', function () {
  return gulp.src(['./app.js'])
    .pipe(linter())
    .pipe(linter.reporter('default', {
      breakOnError: true
    }))
})
```

Using the 'default' standard version with options
```javascript
var gulp = require('gulp')
var linteropts = { globals : ['identifier'] }
var linter = require('gulp-standard-bundle').linter

gulp.task('lint', function () {
  return gulp.src(['./app.js'])
    .pipe(linter(undefined, linteropts))
    .pipe(linter.reporter('default', {
      breakOnError: true
    }))
})
```
Using a given standard instance
```javascript
var gulp = require('gulp')
var standard = require('standard')
var linter = require('gulp-standard-bundle').linter

gulp.task('lint', function () {
  return gulp.src(['./app.js'])
    .pipe(linter(standard))
    .pipe(linter.reporter('default', {
      breakOnError: true
    }))
})
```
Using a given standard instance with options
```javascript
var gulp = require('gulp')
var standard = require('standard')
var linteropts = { globals : ['identifier'] }
var linter = require('gulp-standard-bundle').linter

gulp.task('lint', function () {
  return gulp.src(['./app.js'])
    .pipe(linter(standard, linteropts))
    .pipe(linter.reporter('default', {
      breakOnError: true
    }))
})
```

## Formatter examples (standard-format)

Using the 'default' standard-format version (check package dependencies)
```javascript
var gulp = require('gulp')
var formatter = require('gulp-standard-bundle').formatter

gulp.task('format', function () {
  return gulp.src(['./app.js'])
    .pipe(formatter())
    .pipe(formatter.reporter('default'))
})
```

Using a given standard-format instance
```javascript
var gulp = require('gulp')
var standardformat = require('standard-format')
var formatter = require('gulp-standard-bundle').formatter

gulp.task('format', function () {
  return gulp.src(['./app.js'])
    .pipe(formatter(standardformat))
    .pipe(formatter.reporter('default'))
})
```

## Reporters

#### Built-in

You can choose a reporter when you call
````javascript
stuff
  .pipe(linter())
  .pipe(linter.reporter('default', opts))
````

#### Custom

You can also use some other reporter instance
````javascript
var reporter = require(<REPORTER NAME>);
...
  .pipe(formatter())
  .pipe(formatter.reporter(reporter))
````
Or pass the reporter name () 
````javascript
...
  .pipe(linter())
  .pipe(linter.reporter(<REPORTER NAME>, opts))
````
#### Linter Reporter options

##### breakOnError

Type: `boolean`
Default: `false`

Emit gulp error on reported error

##### breakOnWarning

Type: `boolean`
Default: `false`

Emit gulp error on reported warning

#### Formatter Reporter options

No options

## LICENSE [MIT](LICENSE)

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