# gulp-mocha-browserify-sweet

> Generates a suite file from gulp.src glob on the fly for Browserify/Mocha

Latest version **0.2.1** (published 2014-07-15) · 0 weekly downloads

## Install

```sh
npm install gulp-mocha-browserify-sweet
pnpm add gulp-mocha-browserify-sweet
yarn add gulp-mocha-browserify-sweet
bun add gulp-mocha-browserify-sweet
```

## 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.1 |
| Published | 2014-07-15 |
| First published | 2014-06-04 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.26 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | toran billups |
| Maintainers | toranb |
| Keywords | gulp, browserify, mocha |

## Links

- npm: https://www.npmjs.com/package/gulp-mocha-browserify-sweet
- Repository: https://github.com/toranb/gulp-mocha-browserify-sweet
- Issues: https://github.com/toranb/gulp-mocha-browserify-sweet/issues
- npm.io page: https://npm.io/package/gulp-mocha-browserify-sweet

## Dependencies (2)

- [through](https://npm.io/package/through.md) *
- [gulp-util](https://npm.io/package/gulp-util.md) ~2.2.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2014-07-15
- 0.2.0 — 2014-06-23
- 0.1.0 — 2014-06-04

## README

# gulp-mocha-browserify-sweet

Generates a suite file from `gulp.src` glob on the fly for Browserify/Mocha

## Installation

```shell
    npm install gulp-mocha-browserify-sweet --save-dev
```

## Usage

```javascript
    var gulp = require('gulp');
    var karma = require('gulp-karma');
    var concat = require('gulp-concat');
    var browserify = require('browserify');
    var source = require('vinyl-source-stream');
    var generateSuite = require('gulp-mocha-browserify-sweet');
    
    gulp.task('test-suite', function() {
        return gulp.src('build/test/**/*spec.js')
            .pipe(generateSuite({startWith: 'build'}))
            .pipe(concat('suite.js'))
            .pipe(gulp.dest('dist'));
    });
    
    gulp.task('test', ['test-suite'], function() {
        return browserify({entries: './dist/suite.js'})
            .bundle({ debug: true })
            .pipe(source('deps.min.js'))
            .pipe(gulp.dest('dist'))
            .pipe(karma({
                configFile: 'karma.conf.js',
                action: 'run'
            }));
    });
```

## Optional Configuration

#### opts.suiteFile
Type: `String`
Default: `suite.js`

This optional param will let you set the filename for the generated output

#### opts.startWith
Type: `String`

This optional param will remove any unwanted fragments from the filename

For example:

If you don't add this param and the generated file returns something like this

```javascript
    require('./some/really/long/prefix/build/test/foo.spec.js');
```

You can instead get the following by adding {startWith: 'build'}

```javascript
    require('./../build/test/foo.spec.js');
```

#### opts.addPrefix
Type: `String`

This optional param will add any prefix string to the filename

For example:

If you want to add test to the generated file that starts out like this

```javascript
    require('./unit/example.spec.js');
```

You can add the test prefix by adding {addPrefix: '../test'}

```javascript
    require('./../test/unit/example.spec.js');
```

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