diff --git a/README.md b/README.md index 62d8f2c..393c07b 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ Install **ng-inline-edit** via [Bower](http://bower.io): ```bash bower install ng-inline-edit --production ``` +or +```bash +npm install ng-inline-edit --save +``` Include main files: ```html @@ -23,6 +27,15 @@ angular ]); ``` +Or when you're using Webpack and installed via npm, skip the script tag and + +```js +import ngInlineEdit from 'ng-inline-edit' +import 'ng-inline-edit/dist/ng-inline-edit.css' + +angular.module('myApp', [ngInlineEdit]) +``` + Pass your model to ``inline-edit`` attribute on your HTML element and provide a callback function to listen changes: ```html diff --git a/index.js b/index.js new file mode 100644 index 0000000..891901d --- /dev/null +++ b/index.js @@ -0,0 +1,2 @@ +require('./dist/ng-inline-edit'); +module.exports = 'angularInlineEdit'; diff --git a/package.json b/package.json index df83589..5c67a20 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ng-inline-edit", "description": "Simple inline editing for HTML elements", "version": "0.7.0", - "main": "dist/ng-inline-edit.js", + "main": "index.js", "keywords": [ "angular", "component",