diff --git a/.gitignore b/.gitignore index 6b319f8..365a945 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store -*-min.js \ No newline at end of file +*-min.js +/node_modules/ \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..d782015 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,42 @@ +module.exports = function(grunt) { + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + connect: { + server: { + options: { + base: "", + port: 9999 + } + } + }, + uglify: { + options: { + banner: '/*! <%= pkg.name %> <%= pkg.version %> - <%= pkg.description %> */\n' + }, + build: { + src: 'src/<%= pkg.name %>.js', + dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.min.js' + } + }, + jshint: { + all: { + src: ['src/<%= pkg.name %>.js'] + } + }, + watch: { + all: { + files: ['src/*.js', 'demo/*/*.js'], + tasks: ['default', 'dev'] + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + + grunt.registerTask('default', ['jshint', 'uglify']); + grunt.registerTask("dev", ["connect", "watch"]); +}; diff --git a/README.md b/README.md index f1c7a95..0b0c307 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,16 @@ -SwipeView v1.0 - 2012-08-25 -============================ +SwipeView v1.3.0 - 2013-09-28 +============================= + +- the SwipeView instanciation does not auto-bind anymore +- Add bind() and unbind() +- the old unbind() has been renamed to offAll() + +SwipeView v1.0.5 - 2013-07-04 +============================= + +Modified version of Matteo's SwipeView which allows vertical swipe (with the `vertical` option) and also allows multiple SwipeViews in the same document: + +example: Multiple SwipeViews in the same document + vertical swipe: [http://peutetre.github.io/SwipeView/demo/gallery7/](http://peutetre.github.io/SwipeView/demo/gallery7/) Virtually infinite loop-able horizontal carousel for desktop and mobile browsers. @@ -11,4 +22,4 @@ eReader Demo: [http://cubiq.org/dropbox/SwipeView/demo/ereader](http://cubiq.org Inline Demo: [http://cubiq.org/dropbox/SwipeView/demo/inline](http://cubiq.org/dropbox/SwipeView/demo/inline) -Screencast: [http://www.youtube.com/watch?v=Hhes5JHs8jQ](http://www.youtube.com/watch?v=Hhes5JHs8jQ) \ No newline at end of file +Screencast: [http://www.youtube.com/watch?v=Hhes5JHs8jQ](http://www.youtube.com/watch?v=Hhes5JHs8jQ) diff --git a/demo/ereader/index.html b/demo/ereader/index.html index d6dec0d..2351857 100644 --- a/demo/ereader/index.html +++ b/demo/ereader/index.html @@ -21,6 +21,7 @@ req = new XMLHttpRequest(); ereader = new SwipeView('#wrapper', { hastyPageFlip:true }); + ereader.bind(); // Ajax request req.open('GET', 'flowers.txt', true); @@ -154,4 +155,4 @@