Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
chore(package.json): add commonjs support
Browse files Browse the repository at this point in the history
  • Loading branch information
bendrucker authored and petebacondarwin committed Feb 24, 2015
1 parent 9c0ae24 commit 2b0b50a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
11 changes: 1 addition & 10 deletions README.md
Expand Up @@ -14,21 +14,12 @@ You can install this package either with `npm` or with `bower`.
npm install angular-resource
```

Add a `<script>` to your `index.html`:

```html
<script src="/node_modules/angular-resource/angular-resource.js"></script>
```

Then add `ngResource` as a dependency for your app:

```javascript
angular.module('myApp', ['ngResource']);
angular.module('myApp', [require('angular-resource')]);
```

Note that this package is not in CommonJS format, so doing `require('angular-resource')` will
return `undefined`.

### bower

```shell
Expand Down
2 changes: 2 additions & 0 deletions index.js
@@ -0,0 +1,2 @@
require('./angular-resource');
module.exports = 'ngResource';
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"name": "angular-resource",
"version": "1.3.14-build.55+sha.0cf170d",
"description": "AngularJS module for interacting with RESTful server-side data sources",
"main": "angular-resource.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 2b0b50a

Please sign in to comment.