Skip to content
This repository was archived by the owner on Jul 9, 2020. It is now read-only.

NPM friendly #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ For example, “Man Bites Dog” might produce the slug `man-bites-dog` for the
## Usage

Include `angular-slugify.js` in your HTML document somewhere after you have set
up AngularJS.
up AngularJS or can install it with npm

`npm install angular-slugify` and add `require('angular-slugify');` to your bundle.

```html
<script src="angular-slugify.js">
Expand Down
2 changes: 2 additions & 0 deletions angular-slugify.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,6 @@
return Slug.slugify(input);
};
}]);

module.exports = mod;
})();
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
var angularSlugify = require('angular-slugify');

module.exports = angularSlugify;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-slugify",
"version": "1.0.1",
"version": "1.0.3",
"description": "Provides “slugification” for AngularJS in the form of a service, filter, and a directive.",
"main": "angular-slugify.js",
"directories": {
Expand Down