jquery-nodeico
v0.4.1
Published
A jQuery plugin to display your Node Modules on NPM.
Downloads
7
Readme
A jQuery plugin to display your Node Modules on NPM.
Getting started
Three quick start options are available:
- Download latest release
- Clone the repo:
[email protected]:vieiralucas/jquery-nodeico.git
- Install with Bower:
bower install jquery-nodeico
Setup
Use Bower to fetch all dependencies:
$ bower install
Now you're ready to go!
Usage
HTML
<div id="example"></div>
Include jQuery:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Include plugin's JS:
<script src="jquery.nodeico.min.js"></script>
Call the plugin:
$("#example").nodeico();
Check full example's source code.
Options
Here's a list of available settings.
$("#example").nodeico({
name: 'some-node-module',
type: 'standard',
downloads: true,
rank: true,
stars: true
});
| Attribute | Type | Default | Description |
|-----------|-----------|---------------------|-------------------------------------------------------|
| name | String | jquery-nodeico
| The name of the node module. |
| type | String | standard
| How is the badge ('standard', 'mini', 'compact', 'histogram'). |
| downloads | Boolean | false
| Displays the number of downloads that the module has. |
| rank | Boolean | false
| Displays the download rank of the module. |
| stars | Boolean | false
| Displays the number of stars that the module has. |
| months | Number | 1
| How many months ago should display ('12', '9', '6', '3', '1'). |
| height | Number | 1
| The height of the histograms, there are 3 heights ('1', '2', '3') |
Credits
Built on top of nodei.co.
Used jQuery Boilerplate to generate the structure.
License
MIT License © Lucas Vieira