diff --git a/.gitignore b/.gitignore index 229d541..589ee7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .project node_modules -components +bower_components diff --git a/Gruntfile.js b/Gruntfile.js index 704545a..4800c7e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -43,6 +43,16 @@ module.exports = function(grunt) { dest: 'angular-gestures/', filter: 'isFile'}] } + }, + copy: { + main: { + files: [ + {expand: true, src: ['./*.json'], dest: 'dist/', + filter: 'isFile'}, //copy *.json + {expand: true, src: ['./*.md'], dest: 'dist/', + filter: 'isFile'}, // copy *.md + ] + } } }); @@ -51,6 +61,7 @@ module.exports = function(grunt) { 'jshint', 'concat', 'uglify', + 'copy', 'compress' ]); diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..4347861 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +## The MIT License + +Copyright (c) 2012-2013 Patrick Bartsch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/angular-gestures.zip b/angular-gestures.zip index 3453497..a0f98e3 100644 Binary files a/angular-gestures.zip and b/angular-gestures.zip differ diff --git a/component.json b/bower.json similarity index 82% rename from component.json rename to bower.json index aa15eaf..ea54e5c 100644 --- a/component.json +++ b/bower.json @@ -1,8 +1,7 @@ { - "author": "Patrick Bartsch", "name": "angular-gestures", "description": "AngularJS directive that adds support for multi touch gestures to your app. Based on hammer.js.", - "version": "0.1.0", + "version": "0.1.1", "main": "dist/gestures.min.js", "scripts": [ "dist/gestures.min.js" @@ -12,6 +11,9 @@ "type": "git", "url": "git://github.com/wzr1337/angular-gestures" }, + "author": "wzr1337", + "license": "MIT", + "readmeFilename": "README.md", "dependencies": { "angular": "1.0.6", "hammerjs": "1.0.5" diff --git a/dist/LICENSE.md b/dist/LICENSE.md new file mode 100644 index 0000000..4347861 --- /dev/null +++ b/dist/LICENSE.md @@ -0,0 +1,21 @@ +## The MIT License + +Copyright (c) 2012-2013 Patrick Bartsch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/dist/README.md b/dist/README.md new file mode 100644 index 0000000..99b20bd --- /dev/null +++ b/dist/README.md @@ -0,0 +1,42 @@ +# angular-gestures + +AngularJS directive that adds support for multi touch gestures to your app. Based on hammer.js. + +## Usage + +* Include `gestures.js` or `gestures.min.js` into your page +* Declare `'angular-gestures'` as a dependency for your angular app: `angular.module('myApp', ['angular-gestures']);` +* Use attributes on you containers in the same way you use `ng-click` e.g. `hm-tap="add_something()"` +* You can use angular interpolations like this : `hm-swipe="remove_something({{ id }})"` +* You can also use Hammer.js options by e.g. `hm-tap-opts="{hold: false}"` + +## Supported events +* hmDoubleTap : 'doubletap', +* hmDragStart : 'dragstart', +* hmDrag : 'drag', +* hmDragUp : 'dragup', +* hmDragDown : 'dragdown', +* hmDragLeft : 'dragleft', +* hmDragRight : 'dragright', +* hmDragEnd : 'dragend', +* hmHold : 'hold', +* hmPinch : 'pinch', +* hmPinchIn : 'pinchin', +* hmPinchOut : 'pinchout', +* hmRelease : 'release', +* hmRotate : 'rotate', +* hmSwipe : 'swipe', +* hmSwipeUp : 'swipeup', +* hmSwipeDown : 'swipedown', +* hmSwipeLeft : 'swipeleft', +* hmSwipeRight : 'swiperight', +* hmTap : 'tap', +* hmTouch : 'touch', +* hmTransformStart : 'transformstart', +* hmTransform : 'transform', +* hmTransformEnd : 'transformend' + +## Bower +If you want to use angular-momentum-scroll with bower, add the following dependency to your component.json + +`"angular-gestures": "latest"` diff --git a/dist/bower.json b/dist/bower.json new file mode 100644 index 0000000..ea54e5c --- /dev/null +++ b/dist/bower.json @@ -0,0 +1,21 @@ +{ + "name": "angular-gestures", + "description": "AngularJS directive that adds support for multi touch gestures to your app. Based on hammer.js.", + "version": "0.1.1", + "main": "dist/gestures.min.js", + "scripts": [ + "dist/gestures.min.js" + ], + "homepage": "http://github.com/wzr1337/angular-gestures", + "repository": { + "type": "git", + "url": "git://github.com/wzr1337/angular-gestures" + }, + "author": "wzr1337", + "license": "MIT", + "readmeFilename": "README.md", + "dependencies": { + "angular": "1.0.6", + "hammerjs": "1.0.5" + } +} diff --git a/dist/package.json b/dist/package.json new file mode 100644 index 0000000..008725f --- /dev/null +++ b/dist/package.json @@ -0,0 +1,35 @@ +{ + "name": "angular-gestures", + "version": "0.1.1", + "description": "AngularJS directive that adds support for multi touch gestures to your app. Based on hammer.js.", + "main": "Gruntfile.js", + "scripts": { + "test": "grunt test", + "build": "grunt build" + }, + "repository": { + "type": "git", + "url": "https://github.com/wzr1337/angular-gestures.git" + }, + "keywords": [ + "angularjs", + "hammer.js", + "gestures", + "multitouch" + ], + "author": "wzr1337", + "license": "MIT", + "readmeFilename": "README.md", + "gitHead": "5f9f8f07dc9e0adf87ba119045b9191d90dfe9ca", + "dependencies": {}, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-copy": "~0.4.0", + "grunt-contrib-concat": "~0.1.3", + "grunt-contrib-uglify": "~0.2.0", + "grunt-contrib-jshint": "~0.3.0", + "grunt-contrib-clean": "~0.4.0", + "grunt-contrib-compress": "~0.4.9", + "matchdep": "~0.1.1" + } +} diff --git a/package.json b/package.json index f944ba3..008725f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-gestures", - "version": "0.1.0", + "version": "0.1.1", "description": "AngularJS directive that adds support for multi touch gestures to your app. Based on hammer.js.", "main": "Gruntfile.js", "scripts": {