Skip to content

Commit

Permalink
Work on bower package
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Hines committed Jun 22, 2014
1 parent f0c6c31 commit d5cc121
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 10 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
[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.

## Install it
## Installation
This project, along with all of its dependencies are installed with [Bower](http://bower.io/): `bower install angular-peity`.

## Set up
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.

### Step 1
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`.

![Screenshot of files in project folder](https://raw.githubusercontent.com/projectweekend/angular-peity/master/screenshots/copy-files-into-project.png)

### Step 2
Include the file before the main app file:

~~~html
<script src="/js/lib/jquery-2.1.0.min.js"></script>
<script src="/js/lib/jquery.peity.min.js"></script>
<script src="/js/lib/angular-peity.js"></script>
<script src="/bower_components/jquery/jquery.min.js"></script>
<script src="/bower_components/peity/jquery.peity.min.js"></script>
<script src="/bower_components/angular-peity/angular-peity.js"></script>
<script src="/js/app.js"></script>
~~~

Expand Down Expand Up @@ -70,7 +68,7 @@ cMod.controller( 'ChartCtrl', function ( $scope ) {
width: 150,
stroke: "#eee"
}
};
};

} );
~~~
Expand Down
31 changes: 31 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "angular-piety",
"main": "angular-piety.js",
"version": "0.0.1",
"homepage": "https://github.com/projectweekend/angular-piety",
"authors": [
"Brian Hines <[email protected]>"
],
"description": "An AngularJS directive for using Peity charts",
"moduleType": [
"globals"
],
"keywords": [
"peity",
"charts",
"svg",
"angularjs"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"peity": "benpickles/peity",
"jquery": "~2.0.3"
}
}

0 comments on commit d5cc121

Please sign in to comment.