https://github.com/ember-engines/broccoli-dependency-funnel
Funnels a set of files included (or excluded) from a JS dependency graph
https://github.com/ember-engines/broccoli-dependency-funnel
Last synced: about 2 months ago
JSON representation
Funnels a set of files included (or excluded) from a JS dependency graph
- Host: GitHub
- URL: https://github.com/ember-engines/broccoli-dependency-funnel
- Owner: ember-engines
- Created: 2016-11-30T19:49:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-14T18:21:51.000Z (over 6 years ago)
- Last Synced: 2025-03-23T07:05:27.262Z (2 months ago)
- Language: JavaScript
- Size: 135 KB
- Stars: 3
- Watchers: 2
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# broccoli-dependency-funnel
[](https://travis-ci.org/ember-engines/broccoli-dependency-funnel)
[](https://ci.appveyor.com/project/embercli/broccoli-dependency-funnel)This [Broccoli](https://github.com/broccolijs/broccoli) plugin funnels a set of files included (or excluded) from a JS dependency graph.
In other words, you specify an ES6 module as an entry point and the plugin will walk its import graph and only copy-forward the files included in the graph. Alternatively, you can copy forward all files except those in the graph.
## Usage
```js
const DependencyFunnel = require('broccoli-dependency-funnel');
const input = 'src'; // Can be a directory or Broccoli plugin/nodemodule.exports = new DependencyFunnel(input, {
include: true,
entry: 'app.js',
external: [ 'lodash' ]
});
```## Options
* `include` / `exclude`: you **must** specify _exactly one_ of these options set to `true`. This determines whether the files included in the dependency graph or the files excluded from the dependency graph will be funneled forward.
* `entry`: you **must** specify an entry point to the dependency graph you wish to funnel. This should be a string path relative the input directory/node.
* `external`: an **optional** array of imports to be treated as external, meaning they aren't present in the given input directory structure.
## Development
### Installation
* `git clone `
* `cd broccoli-dependency-funnel`
* `npm install`### Testing
* `npm run test` or `npm run test:debug`