# ember-cli-funnel

> Exclude files from an ember build

Latest version **0.6.1** (published 2018-10-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-funnel
pnpm add ember-cli-funnel
yarn add ember-cli-funnel
bun add ember-cli-funnel
```

## 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.6.1 |
| Published | 2018-10-19 |
| First published | 2016-08-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 6.* \|\| 8.* \|\| >= 10.* |
| Dependencies | 1 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 31 |
| Author | Kelly Selden |
| Maintainers | kellyselden |
| Keywords | broccoli, ember-addon, funnel |

## Links

- npm: https://www.npmjs.com/package/ember-cli-funnel
- Repository: https://github.com/kellyselden/ember-cli-funnel
- Homepage: https://github.com/kellyselden/ember-cli-funnel#readme
- Issues: https://github.com/kellyselden/ember-cli-funnel/issues
- npm.io page: https://npm.io/package/ember-cli-funnel

## Dependencies (1)

- [broccoli-funnel](https://npm.io/package/broccoli-funnel.md) ^2.0.0

## Recent versions

- 0.6.1 (latest) — 2018-10-19
- 0.6.0 — 2018-01-26
- 0.5.0 — 2017-12-05
- 0.4.0 — 2017-12-05
- 0.3.0 — 2017-12-04
- 0.2.0 — 2017-08-25
- 0.1.4 — 2017-04-22
- 0.1.3 — 2017-04-03
- 0.1.2 — 2016-08-29
- 0.1.1 — 2016-08-25
- 0.1.0 — 2016-08-22

## README

ember-cli-funnel
==============================================================================

[![Greenkeeper badge](https://badges.greenkeeper.io/kellyselden/ember-cli-funnel.svg)](https://greenkeeper.io/)
[![npm version](https://badge.fury.io/js/ember-cli-funnel.svg)](https://badge.fury.io/js/ember-cli-funnel)
[![Build Status](https://travis-ci.org/kellyselden/ember-cli-funnel.svg?branch=master)](https://travis-ci.org/kellyselden/ember-cli-funnel)
[![Build Status](https://dev.azure.com/kellyselden/ember-cli-funnel/_apis/build/status/kellyselden.ember-cli-funnel)](https://dev.azure.com/kellyselden/ember-cli-funnel/_build/latest?definitionId=1)

Exclude files from an ember build

Installation
------------------------------------------------------------------------------

```
ember install ember-cli-funnel
```


Usage
------------------------------------------------------------------------------

```js
// ember-cli-build.js

let app = new EmberApp(defaults, {
  funnel: {
    exclude: [
      `${defaults.project.pkg.name}/routes/style-guide/**/*`,
      'addon-tree-output/some-addon/styles/**/*.scss'
    ]
  }
});
```

### Options

* `enabled` (bool): defaults to only in production
* `exclude` (array of globs): defaults to empty array

### Advanced Example 1

Exclude route files and router definitions from the `master` branch build

```
ember install ember-git-version
npm install git-repo-info --save-dev
```

```js
// ember-cli-build.js

let getRepoInfo = require('git-repo-info');

let info = getRepoInfo();

let app = new EmberApp(defaults, {
  funnel: {
    enabled: info.branch === 'master',
    exclude: [`${defaults.project.pkg.name}/routes/style-guide/**/*`]
  }
});
```

```js
// app/router.js

if (config.branch !== 'master') {
  this.route('style-guide', function() {
    // ...
  });
}
```

### Advanced Example 2

Exclude different files for different environments

```js
// ember-cli-build.js

let exclude = [];

switch (EmberApp.env()) {
  case 'development':
    exclude.push(`${defaults.project.pkg.name}/routes/prod-only/**/*`);
    break;
  case 'production':
    exclude.push(`${defaults.project.pkg.name}/routes/dev-only/**/*`);
    break;
}

let app = new EmberApp(defaults, {
  funnel: {
    enabled: true,
    exclude
  }
});
```


Contributing
------------------------------------------------------------------------------

### Installation

* `git clone <repository-url>`
* `cd ember-cli-funnel`
* `npm install`

### Linting

* `npm run lint:js`
* `npm run lint:js -- --fix`

### Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

### Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).

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