Skip to content

Commit d5cc121

Browse files
author
Brian Hines
committed
Work on bower package
1 parent f0c6c31 commit d5cc121

2 files changed

Lines changed: 39 additions & 10 deletions

File tree

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
[Peity](http://benpickles.github.io/peity/) is a jQuery plugin that converts an element's content into simple `<svg>` charts. This is an AngularJS directive that makes them easy to use in any project by binding data and options to a controller.
22

3-
## Install it
3+
## Installation
4+
This project, along with all of its dependencies are installed with [Bower](http://bower.io/): `bower install angular-peity`.
5+
6+
## Set up
47
If you're familar with how to include third-party modules in AngularJS, then you can probably skip this section. If you're new to the framework, this should help.
58

69
### Step 1
7-
This module has two external dependencies: [jquery.peity.min.js](http://benpickles.github.io/peity/jquery.peity.min.js) & [jQuery](http://code.jquery.com/jquery-2.1.0.min.js). You will need to get copies of both of these files and put them in your project, in addition to adding a copy of the `angular-peity.js` file from this repository. In this example, I'm using the directory '/js/lib' for the location. My main AngularJS app in this case is in `/js`.
8-
9-
![Screenshot of files in project folder](https://raw.githubusercontent.com/projectweekend/angular-peity/master/screenshots/copy-files-into-project.png)
10-
11-
### Step 2
1210
Include the file before the main app file:
1311

1412
~~~html
15-
<script src="/js/lib/jquery-2.1.0.min.js"></script>
16-
<script src="/js/lib/jquery.peity.min.js"></script>
17-
<script src="/js/lib/angular-peity.js"></script>
13+
<script src="/bower_components/jquery/jquery.min.js"></script>
14+
<script src="/bower_components/peity/jquery.peity.min.js"></script>
15+
<script src="/bower_components/angular-peity/angular-peity.js"></script>
1816
<script src="/js/app.js"></script>
1917
~~~
2018

@@ -70,7 +68,7 @@ cMod.controller( 'ChartCtrl', function ( $scope ) {
7068
width: 150,
7169
stroke: "#eee"
7270
}
73-
};
71+
};
7472

7573
} );
7674
~~~

bower.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "angular-piety",
3+
"main": "angular-piety.js",
4+
"version": "0.0.1",
5+
"homepage": "https://github.com/projectweekend/angular-piety",
6+
"authors": [
7+
"Brian Hines <brian@projectweekend.net>"
8+
],
9+
"description": "An AngularJS directive for using Peity charts",
10+
"moduleType": [
11+
"globals"
12+
],
13+
"keywords": [
14+
"peity",
15+
"charts",
16+
"svg",
17+
"angularjs"
18+
],
19+
"license": "MIT",
20+
"ignore": [
21+
"**/.*",
22+
"node_modules",
23+
"bower_components",
24+
"test",
25+
"tests"
26+
],
27+
"dependencies": {
28+
"peity": "benpickles/peity",
29+
"jquery": "~2.0.3"
30+
}
31+
}

0 commit comments

Comments
 (0)