Commit 81fcbe93 authored by nextime's avatar nextime

Fix error in repo

parent 310ff7f3
{
"json": "bower.json"
}
\ No newline at end of file
# ide
.idea
.iml
# node
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
pids
logs
results
npm-debug.log
node_modules
\ No newline at end of file
[submodule "hammer.js"]
path = hammer.js
url = https://github.com/EightMedia/hammer.js.git
language: node_js
node_js:
- "0.10"
before_script:
- npm install -g grunt-cli
script:
- grunt test
\ No newline at end of file
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
# meta options
meta:
banner: '
/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n
* <%= pkg.homepage %>\n
*\n
* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> <<%= pkg.author.email %>>;\n
* Licensed under the <%= _.pluck(pkg.licenses, "type").join(", ") %> license */'
# concat src files
concat:
options:
separator: '\n\n'
banner: '<%= meta.banner %>'
standalone:
src: [
'src/intro.js'
'src/plugin.js'
'src/outro.js']
dest: 'jquery.hammer-standalone.js'
full:
src: [
'hammer.js/hammer.js'
'jquery.hammer-standalone.js']
dest: 'jquery.hammer.js'
# minify the sourcecode
uglify:
options:
report: 'gzip'
banner: '<%= meta.banner %>'
standalone:
options:
sourceMap: 'jquery.hammer-standalone.min.map'
files:
'jquery.hammer-standalone.min.js': ['jquery.hammer-standalone.js']
full:
options:
sourceMap: 'jquery.hammer.min.map'
files:
'jquery.hammer.min.js': ['jquery.hammer.js']
# check for optimisations and errors
jshint:
options:
curly: true
expr: true
newcap: true
quotmark: 'single'
regexdash: true
trailing: true
undef: true
unused: true
maxerr: 100
eqnull: true
sub: false
browser: true
node: true
globals:
Hammer: true,
define: false
dist:
src: ['jquery.hammer-standalone.js']
# watch for changes
watch:
scripts:
files: ['src/*.js']
tasks: ['concat']
options:
interrupt: true
# simple node server
connect:
server:
options:
hostname: "0.0.0.0"
# tests
qunit:
all: ['tests/**/*.html']
# Load tasks
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.loadNpmTasks 'grunt-contrib-qunit'
# Default task(s).
grunt.registerTask 'default', ['connect','watch']
grunt.registerTask 'test', ['jshint','connect','qunit']
grunt.registerTask 'build', ['concat','uglify','test']
grunt.registerTask 'build-simple', ['concat','uglify','jshint']
Copyright (C) 2013 by Jorik Tangelder (Eight Media)
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
jquery.hammer.js
================
[![Build Status](https://travis-ci.org/EightMedia/jquery.hammer.js.png)](https://travis-ci.org/EightMedia/jquery.hammer.js/)
jQuery plugin for [Hammer.js](https://github.com/EightMedia/hammer.js)
Since version 1.0.6 it is seperated from the main lib, and lives in this repository.
It still needs the main library to be included, but a combined version is on its way. :beer:
{
"name": "jquery-hammerjs",
"version": "1.0.0",
"main": ["jquery.hammer.js"],
"dependencies": {
"jquery": "*",
"hammerjs": "1.0.x"
},
"ignore": [
"tests",
"component.json",
"package.json",
"examples",
"src"
]
}
\ No newline at end of file
{
"name": "jquery-hammerjs",
"version": "1.0.0",
"main": "jquery.hammer.js",
"scripts": [
"jquery.hammer.js"
]
}
/*! jQuery plugin for Hammer.JS - v1.0.0 - 2014-01-02
* http://eightmedia.github.com/hammer.js
*
* Copyright (c) 2014 Jorik Tangelder <j.tangelder@gmail.com>;
* Licensed under the MIT license */(function(window, undefined) {
'use strict';
function setup(Hammer, $) {
/**
* bind dom events
* this overwrites addEventListener
* @param {HTMLElement} element
* @param {String} eventTypes
* @param {Function} handler
*/
Hammer.event.bindDom = function(element, eventTypes, handler) {
$(element).on(eventTypes, function(ev) {
var data = ev.originalEvent || ev;
if(data.pageX === undefined) {
data.pageX = ev.pageX;
data.pageY = ev.pageY;
}
if(!data.target) {
data.target = ev.target;
}
if(data.which === undefined) {
data.which = data.button;
}
if(!data.preventDefault) {
data.preventDefault = ev.preventDefault;
}
if(!data.stopPropagation) {
data.stopPropagation = ev.stopPropagation;
}
handler.call(this, data);
});
};
/**
* the methods are called by the instance, but with the jquery plugin
* we use the jquery event methods instead.
* @this {Hammer.Instance}
* @return {jQuery}
*/
Hammer.Instance.prototype.on = function(types, handler) {
return $(this.element).on(types, handler);
};
Hammer.Instance.prototype.off = function(types, handler) {
return $(this.element).off(types, handler);
};
/**
* trigger events
* this is called by the gestures to trigger an event like 'tap'
* @this {Hammer.Instance}
* @param {String} gesture
* @param {Object} eventData
* @return {jQuery}
*/
Hammer.Instance.prototype.trigger = function(gesture, eventData) {
var el = $(this.element);
if(el.has(eventData.target).length) {
el = $(eventData.target);
}
return el.trigger({
type : gesture,
gesture: eventData
});
};
/**
* jQuery plugin
* create instance of Hammer and watch for gestures,
* and when called again you can change the options
* @param {Object} [options={}]
* @return {jQuery}
*/
$.fn.hammer = function(options) {
return this.each(function() {
var el = $(this);
var inst = el.data('hammer');
// start new hammer instance
if(!inst) {
el.data('hammer', new Hammer(this, options || {}));
}
// change the options
else if(inst && options) {
Hammer.utils.extend(inst.options, options);
}
});
};
}
// Based off Lo-Dash's excellent UMD wrapper (slightly modified) - https://github.com/bestiejs/lodash/blob/master/lodash.js#L5515-L5543
// some AMD build optimizers, like r.js, check for specific condition patterns like the following:
if(typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
// define as an anonymous module
define(['hammer', 'jquery'], setup);
}
else {
setup(window.Hammer, window.jQuery || window.Zepto);
}
})(this);
\ No newline at end of file
/*! jQuery plugin for Hammer.JS - v1.0.0 - 2014-01-02
* http://eightmedia.github.com/hammer.js
*
* Copyright (c) 2014 Jorik Tangelder <j.tangelder@gmail.com>;
* Licensed under the MIT license */
!function(a,b){"use strict";function c(a,c){a.event.bindDom=function(a,d,e){c(a).on(d,function(a){var c=a.originalEvent||a;c.pageX===b&&(c.pageX=a.pageX,c.pageY=a.pageY),c.target||(c.target=a.target),c.which===b&&(c.which=c.button),c.preventDefault||(c.preventDefault=a.preventDefault),c.stopPropagation||(c.stopPropagation=a.stopPropagation),e.call(this,c)})},a.Instance.prototype.on=function(a,b){return c(this.element).on(a,b)},a.Instance.prototype.off=function(a,b){return c(this.element).off(a,b)},a.Instance.prototype.trigger=function(a,b){var d=c(this.element);return d.has(b.target).length&&(d=c(b.target)),d.trigger({type:a,gesture:b})},c.fn.hammer=function(b){return this.each(function(){var d=c(this),e=d.data("hammer");e?e&&b&&a.utils.extend(e.options,b):d.data("hammer",new a(this,b||{}))})}}"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(["hammer","jquery"],c):c(a.Hammer,a.jQuery||a.Zepto)}(this);
//# sourceMappingURL=jquery.hammer-standalone.min.map
\ No newline at end of file
{"version":3,"file":"jquery.hammer-standalone.min.js","sources":["jquery.hammer-standalone.js"],"names":["window","undefined","setup","Hammer","$","event","bindDom","element","eventTypes","handler","on","ev","data","originalEvent","pageX","pageY","target","which","button","preventDefault","stopPropagation","call","this","Instance","prototype","types","off","trigger","gesture","eventData","el","has","length","type","fn","hammer","options","each","inst","utils","extend","define","amd","jQuery","Zepto"],"mappings":";;;;;CAIoC,SAAUA,EAAQC,GACpD,YAEF,SAASC,GAAMC,EAAQC,GAQrBD,EAAOE,MAAMC,QAAU,SAASC,EAASC,EAAYC,GACnDL,EAAEG,GAASG,GAAGF,EAAY,SAASG,GACjC,GAAIC,GAAOD,EAAGE,eAAiBF,CAE5BC,GAAKE,QAAUb,IAChBW,EAAKE,MAAQH,EAAGG,MAChBF,EAAKG,MAAQJ,EAAGI,OAGdH,EAAKI,SACPJ,EAAKI,OAASL,EAAGK,QAGhBJ,EAAKK,QAAUhB,IAChBW,EAAKK,MAAQL,EAAKM,QAGhBN,EAAKO,iBACPP,EAAKO,eAAiBR,EAAGQ,gBAGvBP,EAAKQ,kBACPR,EAAKQ,gBAAkBT,EAAGS,iBAG5BX,EAAQY,KAAKC,KAAMV,MAUvBT,EAAOoB,SAASC,UAAUd,GAAK,SAASe,EAAOhB,GAC7C,MAAOL,GAAEkB,KAAKf,SAASG,GAAGe,EAAOhB,IAEnCN,EAAOoB,SAASC,UAAUE,IAAM,SAASD,EAAOhB,GAC9C,MAAOL,GAAEkB,KAAKf,SAASmB,IAAID,EAAOhB,IAYpCN,EAAOoB,SAASC,UAAUG,QAAU,SAASC,EAASC,GACpD,GAAIC,GAAK1B,EAAEkB,KAAKf,QAKhB,OAJGuB,GAAGC,IAAIF,EAAUb,QAAQgB,SAC1BF,EAAK1B,EAAEyB,EAAUb,SAGZc,EAAGH,SACRM,KAASL,EACTA,QAASC,KAYbzB,EAAE8B,GAAGC,OAAS,SAASC,GACrB,MAAOd,MAAKe,KAAK,WACf,GAAIP,GAAK1B,EAAEkB,MACPgB,EAAOR,EAAGlB,KAAK,SAEf0B,GAIIA,GAAQF,GACdjC,EAAOoC,MAAMC,OAAOF,EAAKF,QAASA,GAJlCN,EAAGlB,KAAK,SAAU,GAAIT,GAAOmB,KAAMc,WAYrB,kBAAVK,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,IAExED,QAAQ,SAAU,UAAWvC,GAI7BA,EAAMF,EAAOG,OAAQH,EAAO2C,QAAU3C,EAAO4C,QAE9CtB"}
\ No newline at end of file
{
"name": "jquery-hammerjs",
"title": "jQuery plugin for Hammer.JS",
"description": "A javascript library for multi-touch gestures",
"version": "1.0.0",
"homepage": "http://eightmedia.github.com/hammer.js",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/eightmedia/jquery.hammer.js/blob/master/LICENSE"
}
],
"keywords": [
"jquery",
"touch",
"gestures"
],
"author": {
"name": "Jorik Tangelder",
"email": "j.tangelder@gmail.com"
},
"repository": {
"type": "git",
"url": "git://github.com/EightMedia/jquery.hammer.js.git"
},
"bugs": {
"url": "https://github.com/EightMedia/jquery.hammer.js/issues"
},
"devDependencies": {
"grunt": "0.4.x",
"grunt-contrib-connect": "0.5.x",
"grunt-contrib-concat": "0.3.x",
"grunt-contrib-uglify": "0.2.x",
"grunt-contrib-jshint": "0.7.x",
"grunt-contrib-watch": "0.5.x",
"faketouches": "git://github.com/jtangelder/faketouches.js.git",
"underscore": "1.5.x",
"grunt-contrib-qunit": "~0.3.0"
},
"main": "jquery.hammer.js",
"engines": {
"node": ">=0.8.0"
},
"scripts": {
"test": "grunt test"
}
}
(function(window, undefined) {
'use strict';
\ No newline at end of file
// Based off Lo-Dash's excellent UMD wrapper (slightly modified) - https://github.com/bestiejs/lodash/blob/master/lodash.js#L5515-L5543
// some AMD build optimizers, like r.js, check for specific condition patterns like the following:
if(typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
// define as an anonymous module
define(['hammer', 'jquery'], setup);
}
else {
setup(window.Hammer, window.jQuery || window.Zepto);
}
})(this);
\ No newline at end of file
function setup(Hammer, $) {
/**
* bind dom events
* this overwrites addEventListener
* @param {HTMLElement} element
* @param {String} eventTypes
* @param {Function} handler
*/
Hammer.event.bindDom = function(element, eventTypes, handler) {
$(element).on(eventTypes, function(ev) {
var data = ev.originalEvent || ev;
if(data.pageX === undefined) {
data.pageX = ev.pageX;
data.pageY = ev.pageY;
}
if(!data.target) {
data.target = ev.target;
}
if(data.which === undefined) {
data.which = data.button;
}
if(!data.preventDefault) {
data.preventDefault = ev.preventDefault;
}
if(!data.stopPropagation) {
data.stopPropagation = ev.stopPropagation;
}
handler.call(this, data);
});
};
/**
* the methods are called by the instance, but with the jquery plugin
* we use the jquery event methods instead.
* @this {Hammer.Instance}
* @return {jQuery}
*/
Hammer.Instance.prototype.on = function(types, handler) {
return $(this.element).on(types, handler);
};
Hammer.Instance.prototype.off = function(types, handler) {
return $(this.element).off(types, handler);
};
/**
* trigger events
* this is called by the gestures to trigger an event like 'tap'
* @this {Hammer.Instance}
* @param {String} gesture
* @param {Object} eventData
* @return {jQuery}
*/
Hammer.Instance.prototype.trigger = function(gesture, eventData) {
var el = $(this.element);
if(el.has(eventData.target).length) {
el = $(eventData.target);
}
return el.trigger({
type : gesture,
gesture: eventData
});
};
/**
* jQuery plugin
* create instance of Hammer and watch for gestures,
* and when called again you can change the options
* @param {Object} [options={}]
* @return {jQuery}
*/
$.fn.hammer = function(options) {
return this.each(function() {
var el = $(this);
var inst = el.data('hammer');
// start new hammer instance
if(!inst) {
el.data('hammer', new Hammer(this, options || {}));
}
// change the options
else if(inst && options) {
Hammer.utils.extend(inst.options, options);
}
});
};
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic Test Suite</title>
<!-- Load local QUnit. -->
<link rel="stylesheet" href="../hammer.js/tests/libs/qunit.css" media="screen">
<script src="../hammer.js/tests/libs/jquery.js"></script>
<script src="../hammer.js/tests/libs/qunit.js"></script>
<script src="../hammer.js/tests/libs/underscore.js"></script>
<script src="../node_modules/faketouches/faketouches.js"></script>
<script src="../jquery.hammer.js"></script>
<script src="../hammer.js/plugins/hammer.showtouches.js"></script>
</head>
<body>
<script>
Hammer.HAS_POINTEREVENTS = false;
Hammer.HAS_TOUCHEVENTS = false;
var set_faketouches_type = FakeTouches.MOUSE_EVENTS;
</script>
<div id="toucharea" style="width:500px;height:500px;"></div>
<div id="qunit"></div>
<script src="../hammer.js/tests/gestures.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic Test Suite</title>
<!-- Load local QUnit. -->
<link rel="stylesheet" href="../hammer.js/tests/libs/qunit.css" media="screen">
<script src="../hammer.js/tests/libs/jquery.js"></script>
<script src="../hammer.js/tests/libs/qunit.js"></script>
<script src="../hammer.js/tests/libs/underscore.js"></script>
<script src="../node_modules/faketouches/faketouches.js"></script>
<script src="../jquery.hammer.js"></script>
<script src="../hammer.js/plugins/hammer.showtouches.js"></script>
</head>
<body>
<script>
Hammer.HAS_POINTEREVENTS = false;
Hammer.HAS_TOUCHEVENTS = true;
var set_faketouches_type = FakeTouches.TOUCH_AND_MOUSE_EVENTS;
</script>
<div id="toucharea" style="width:500px;height:500px;"></div>
<div id="qunit"></div>
<script src="../hammer.js/tests/gestures.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic Test Suite</title>
<!-- Load local QUnit. -->
<link rel="stylesheet" href="../hammer.js/tests/libs/qunit.css" media="screen">
<script src="../hammer.js/tests/libs/jquery.js"></script>
<script src="../hammer.js/tests/libs/qunit.js"></script>
<script src="../hammer.js/tests/libs/underscore.js"></script>
<script src="../node_modules/faketouches/faketouches.js"></script>
<script src="../jquery.hammer.js"></script>
<script src="../hammer.js/plugins/hammer.showtouches.js"></script>
</head>
<body>
<script>
Hammer.HAS_POINTEREVENTS = true;
Hammer.HAS_TOUCHEVENTS = false;
var set_faketouches_type = FakeTouches.POINTER_MOUSE_EVENTS;
</script>
<div id="toucharea" style="width:500px;height:500px;"></div>
<div id="qunit"></div>
<script src="../hammer.js/tests/gestures.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic Test Suite</title>
<!-- Load local QUnit. -->
<link rel="stylesheet" href="../hammer.js/tests/libs/qunit.css" media="screen">
<script src="../hammer.js/tests/libs/jquery.js"></script>
<script src="../hammer.js/tests/libs/qunit.js"></script>
<script src="../hammer.js/tests/libs/underscore.js"></script>
<script src="../node_modules/faketouches/faketouches.js"></script>
<script src="../jquery.hammer.js"></script>
<script src="../hammer.js/plugins/hammer.showtouches.js"></script>
</head>
<body>
<script>
Hammer.HAS_POINTEREVENTS = true;
Hammer.HAS_TOUCHEVENTS = false;
var set_faketouches_type = FakeTouches.POINTER_TOUCH_EVENTS;
</script>
<div id="toucharea" style="width:500px;height:500px;"></div>
<div id="qunit"></div>
<script src="../hammer.js/tests/gestures.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic Test Suite</title>
<!-- Load local QUnit. -->
<link rel="stylesheet" href="../hammer.js/tests/libs/qunit.css" media="screen">
<script src="../hammer.js/tests/libs/jquery.js"></script>
<script src="../hammer.js/tests/libs/qunit.js"></script>
<script src="../hammer.js/tests/libs/underscore.js"></script>
<script src="../node_modules/faketouches/faketouches.js"></script>
<script src="../jquery.hammer.js"></script>
<script src="../hammer.js/plugins/hammer.showtouches.js"></script>
</head>
<body>
<script>
Hammer.HAS_POINTEREVENTS = false;
Hammer.HAS_TOUCHEVENTS = true;
var set_faketouches_type = FakeTouches.TOUCH_EVENTS;
</script>
<div id="toucharea" style="width:500px;height:500px;"></div>
<div id="qunit"></div>
<script src="../hammer.js/tests/gestures.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic Test Suite</title>
<!-- Load local QUnit. -->
<link rel="stylesheet" href="../hammer.js/tests/libs/qunit.css" media="screen">
<script src="../hammer.js/tests/libs/jquery.js"></script>
<script src="../hammer.js/tests/libs/qunit.js"></script>
<script src="../hammer.js/tests/libs/underscore.js"></script>
<script src="../node_modules/faketouches/faketouches.js"></script>
<script src="../jquery.hammer.js"></script>
<script src="../hammer.js/plugins/hammer.showtouches.js"></script>
</head>
<body>
<div id="qunit"></div>
<script src="../hammer.js/tests/utils.js"></script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment