Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/miguelcastillo/deps-bits
- Owner: MiguelCastillo
- Created: 2015-03-02T23:22:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-21T00:21:41.000Z (about 6 years ago)
- Last Synced: 2024-10-19T20:11:56.878Z (18 days ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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}))
});
```