Skip to content

Commit

Permalink
Removed the conditional return statements on method.
Browse files Browse the repository at this point in the history
Reason is that, we should be able to force it to scroll to the bottom.
I'm not even sure why I had it in there in the first place.

Other changes:
Changed @isdead to @stopped because the former's ambiguity.

Added method chaining for the @addEvents method and replaced 'bind' with 'on'.
Similar thing done to @removeEvents

Cleaned up code and added comments on the @reset method.

It may have added a few weight in terms of file size, but I prefer
having a comprehensive code that's easy to improve and update.

Added explanation to the formula for the scrolling mechanism in the
@scroll method.

Added makefile for development preview.

On a personal note: Seriously, good job guys. I've seen the changes and just wanna say
thank you for contributing and helping the plugin work better. Special shoutout to @kristerkari
for the continuous updates.
  • Loading branch information
jamesflorentino committed May 24, 2012
1 parent a40c7d5 commit 6ef76ca
Show file tree
Hide file tree
Showing 6 changed files with 277 additions and 285 deletions.
26 changes: 15 additions & 11 deletions Cakefile
Expand Up @@ -3,14 +3,18 @@ fs = require "fs"
closure = require "./build/closure"

task "build", "Build everything and minify", (options) ->
exec "redcarpet README.md > bin/readme.html", () ->
exec "coffee -c --bare --output bin/javascripts/ coffeescripts/", (err, stdout, stderr) ->
throw err if err
console.log stdout + stderr if (stderr? or stdout?)
fs.readFile "bin/javascripts/jquery.nanoscroller.js", "utf-8", (errReading, data) ->
throw errReading if errReading
closure.compile data, (errCompiling, code) ->
throw errCompiling if errCompiling
fs.writeFile "bin/javascripts/jquery.nanoscroller.min.js", code, (errWriting) ->
throw errWriting if errWriting
console.log "Success!"
exec "redcarpet README.md > bin/readme.html", () ->
exec "coffee -c --bare --output bin/javascripts/ coffeescripts/", (err, stdout, stderr) ->
throw err if err
console.log stdout + stderr if (stderr? or stdout?)
fs.readFile "bin/javascripts/jquery.nanoscroller.js", "utf-8", (errReading, data) ->
throw errReading if errReading
closure.compile data, (errCompiling, code) ->
throw errCompiling if errCompiling
fs.writeFile "bin/javascripts/jquery.nanoscroller.min.js", code, (errWriting) ->
throw errWriting if errWriting
console.log "Success!"

task "server", "Run a simple http server in Python for testing", (options) ->
console.log "Running a python server in http://localhost:8100"
exec "python -m SimpleHTTPServer 8100", (o) ->
6 changes: 6 additions & 0 deletions Makefile
@@ -0,0 +1,6 @@
all:
cake build
cake server

develop:
coffee -o bin/javascripts -wcb coffeescripts

4 comments on commit 6ef76ca

@kristerkari
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we want .on instead of .bind ? It makes the plugin incompatible with jQuery versions older than 1.7

@jamesflorentino
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm good call. Hang on, pushing a commit.

@jamesflorentino
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Committed.

@kristerkari
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

Please sign in to comment.