Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/miguelcastillo/deps-bits

Process amd and cjs dependencies in bit runner
https://github.com/miguelcastillo/deps-bits

Last synced: 9 days ago
JSON representation

Process amd and cjs dependencies in bit runner

Awesome Lists containing this project

README

        

# deps-bits

[![Greenkeeper badge](https://badges.greenkeeper.io/MiguelCastillo/deps-bits.svg)](https://greenkeeper.io/)

Process amd and cjs dependencies in [bit runner](https://github.com/MiguelCastillo/bit-runner).

> Side note: this module is also used by [bit imports](https://github.com/MiguelCastillo/bit-imports) to process dependencies in the browser.

### Configuration `bitrunnerfile.js`

#### Process dependencies

``` javascript
var bitRunner = require('bit-runner');
var deps = require('deps-bits');

/**
* JavaScript pipeline
*/
bitRunner.register('default', function buildPipeline(task) {
task
.load('index.js')
.then(deps)
});
```

#### Configure it

deps bits uses [acorn](http://marijnhaverbeke.nl/acorn/) internally, and the configuration settings provided here are forwarded right to it. So, please refer to [acorn's docs](http://marijnhaverbeke.nl/acorn/) for details on the available options.

``` javascript
var bitRunner = require('bit-runner');
var deps = require('deps-bits');

/**
* JavaScript pipeline
*/
bitRunner.register('default', function buildPipeline(task) {
task
.load('index.js')
.then(deps.config({ecmaVersion: 6}))
});
```