A slush generator for BioJS modules
npm install slush-biojs[![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Dev. Dependency Status][daviddm-dev-image]][daviddm-dev-url]
> A slush generator for BioJS packages.
Install slush-biojs globally:
``bash`
npm install -g slush-biojs
Remember to install slush globally as well, if you haven't already:
`bash`
npm install -g slush
__Warning__: You might need to use sudo.
You can also setup npm to install packages into your userdir.
Create a new folder for your project:
`bash`
mkdir my-module
Run the generator from within the new folder:
`bash`
cd my-module && slush biojs
How to use
-----------
npm run provides a run environment with all locally installed modules in thePATH var. So if you hate typing, you can install the programm globally (-g).
Allows you to write minimal example snippets of your visualization.
These snippets will be used for the BioJS registry and each snippet can visualize for one specific use case of your component (e.g. adjusting the menubar or changing default color). Those snippets can later be easily edited in a web editor like JSBin and thus should be minimal. A rule of thumb maximum for a snippet is 10 lines (otherwise your component is probably really hard to use).
~~~
npm run sniper
~~~
and open http://localhost:9090/examples
Executed command: biojs-sniper
Watches all your files and runs browserify on every change.
Combine this with the sniper.
(Subsequent runs of watchify are fast).
~~~
npm run watch
~~~
Executed command: gulp watch
~~~
npm run test
~~~
Executed command: gulp test
They are grouped into two sections:
* Non-DOM gulp test-unit (folder: test/unit)gulp test-dom
* DOM-only (folder: test/dom)
Gotchas:
* The Unit tests are run with PhantomJS, if you want to debug them open the test/index.html test/dom/index.js
your browser.
* You need to add your _DOM_ tests to the .
If you want to auto-execute all your test on a file change, run:
~~~
npm run test-watch
~~~
The will run parcelify and bundle all your CSS resources.
~~~
npm run css
~~~
(you can add transforms for SASS or LESS and use the npm run watch-css to constantly watch for css changes)
Learn more about CSS Stylesheets in BioJS
~~~
npm run w
~~~
This will be available depending on your slush configuration.
It is an alias for:
~~~
prunner "npm run task1" "npm run task2"
~~~
Prunner allows on to run multiple npm tasks in one shell.
Normally at least npm run sniper and npm run watch are included in this. Check your package.json for your exact configuration.
Configuration
---------------
* command line arguments (parsed by minimist)
* environment variables prefixed with slush-biojs_--config file
* if you passed an option then from that file.slush-biojsrc
* a local or the first found looking in ./ ../ ../../ ../../../ etc.$HOME/.slush-biojsrc
* $HOME/.slush-biojs/config
* $HOME/.config/slush-biojs
* $HOME/.config/slush-biojs/config
* /etc/slush-biojsrc
* /etc/slush-biojs/config
*
```
{
"authorName": "greenify",
"authorEmail": "greeenify@gmail.com",
"userName": "greenify"
"license": "MIT"
}
[npm-url]: https://npmjs.org/package/slush-biojs
[npm-image]: https://badge.fury.io/js/slush-biojs.svg
[daviddm-url]: https://david-dm.org/biojs/slush-biojs
[daviddm-image]: https://david-dm.org/biojs/slush-biojs.svg?theme=shields.io
[daviddm-dev-url]: https://david-dm.org/biojs/slush-biojs#info=devDependencies
[daviddm-dev-image]: https://david-dm.org/biojs/slush-biojs/dev-status.svg?theme=shields.io