From fda98a27179bec01f9e6c9aef45005e1675aa614 Mon Sep 17 00:00:00 2001
From: Zeno Rocha
Date: Thu, 28 Feb 2013 23:56:34 -0300
Subject: [PATCH 001/101] adding multistring option to jshint
---
grunt.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/grunt.js b/grunt.js
index a1b8dc8..255743c 100644
--- a/grunt.js
+++ b/grunt.js
@@ -3,6 +3,11 @@ module.exports = function(grunt) {
grunt.initConfig({
lint: {
files: ['jquery.github.js']
+ },
+ jshint: {
+ options: {
+ multistr: true
+ }
}
});
From 20963803339b2a718c4c798b78ae80acd0ce5f57 Mon Sep 17 00:00:00 2001
From: Zeno Rocha
Date: Thu, 28 Feb 2013 23:57:05 -0300
Subject: [PATCH 002/101] fixing weak comparision operator
---
jquery.github.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/jquery.github.js b/jquery.github.js
index f80f06d..3323f56 100644
--- a/jquery.github.js
+++ b/jquery.github.js
@@ -32,7 +32,6 @@
this.element = element;
this.$container = $(element);
this.repo = this.$container.attr("data-repo");
- this.cached;
// jQuery has an extend method which merges the contents of two or
// more objects, storing the result in the first object. The first object
@@ -56,7 +55,7 @@
cached = sessionStorage.getItem('gh-repos:' + this.repo);
}
- if (cached != null) {
+ if (cached !== null) {
self.applyTemplate(JSON.parse(cached));
}
else {
From 39027a4af571a985c681fe42cb9d78faca19e402 Mon Sep 17 00:00:00 2001
From: Zeno Rocha
Date: Fri, 1 Mar 2013 00:35:05 -0300
Subject: [PATCH 003/101] removing manually minified version and moving source
to another folder
---
jquery.github.min.js | 10 ----------
jquery.github.js => src/jquery.github.js | 0
2 files changed, 10 deletions(-)
delete mode 100644 jquery.github.min.js
rename jquery.github.js => src/jquery.github.js (100%)
diff --git a/jquery.github.min.js b/jquery.github.min.js
deleted file mode 100644
index 5e70f34..0000000
--- a/jquery.github.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * jQuery Github v0.2.2
- * A jQuery plugin to display your Github Repositories.
- * http://git.io/WUV4_Q
- *
- * Zeno Rocha
- * MIT License
- */
-
-(function(a,b){function g(b,c){this.element=b,this.$container=a(b),this.repo=this.$container.attr("data-repo"),this.cached,this.options=a.extend({},f,c),this._defaults=f,this._name=d,this.init()}var d="github",f=(b.document,{propertyName:"value"});g.prototype.init=function(){var e,d=this;b.sessionStorage&&(e=sessionStorage.getItem("gh-repos:"+this.repo)),null!=e?d.applyTemplate(JSON.parse(e)):a.ajax({url:"https://api.github.com/repos/"+this.repo,dataType:"jsonp",success:function(a){return a.meta.status>=400&&a.data.message?(console.warn(a.data.message),c):(d.applyTemplate(a.data),b.sessionStorage&&sessionStorage.setItem("gh-repos:"+d.repo,JSON.stringify(a.data)),c)}})},g.prototype.applyTemplate=function(b){var c=this,d=new Date(b.pushed_at),e=d.getDate()+"/"+(d.getMonth()+1)+"/"+d.getFullYear(),f=a(a.parseHTML(' '+b.description+' — Read More
Latest commit to master on '+e+'
Download as zip
'));c.appendTemplate(f)},g.prototype.appendTemplate=function(a){var b=this;a.appendTo(b.$container)},a.fn[d]=function(b){return this.each(function(){a.data(this,"plugin_"+d)||a.data(this,"plugin_"+d,new g(this,b))})}})(jQuery,window);
\ No newline at end of file
diff --git a/jquery.github.js b/src/jquery.github.js
similarity index 100%
rename from jquery.github.js
rename to src/jquery.github.js
From 3473ea54d7f227469bf6ab84af70eafd71c37005 Mon Sep 17 00:00:00 2001
From: Zeno Rocha
Date: Fri, 1 Mar 2013 00:46:01 -0300
Subject: [PATCH 004/101] ignoring node_modules
---
.gitignore | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 496ee2c..91dfed8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-.DS_Store
\ No newline at end of file
+.DS_Store
+node_modules
\ No newline at end of file
From 16f0f617f7e5e794369d8b21e8c8d38e35634e1c Mon Sep 17 00:00:00 2001
From: Zeno Rocha
Date: Fri, 1 Mar 2013 00:46:53 -0300
Subject: [PATCH 005/101] added minify task
---
grunt.js | 32 ++++++++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
diff --git a/grunt.js b/grunt.js
index 255743c..1664dec 100644
--- a/grunt.js
+++ b/grunt.js
@@ -1,17 +1,45 @@
module.exports = function(grunt) {
grunt.initConfig({
+
+ // Meta informations
+ pkg: '',
+ meta: {
+ banner: '/*\n' +
+ ' * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n' +
+ ' * <%= pkg.description %>\n' +
+ ' * <%= pkg.homepage %>\n\n' +
+ ' * Copyright (c) <%= grunt.template.today("yyyy") %>\n' +
+ ' * MIT License\n' +
+ ' */'
+ },
+ concat: {
+ dist: {
+ src: ['', ''],
+ dest: 'dist/jquery.github.js'
+ }
+ },
+
+ // Lint definitions
lint: {
- files: ['jquery.github.js']
+ files: ['src/jquery.github.js']
},
jshint: {
options: {
multistr: true
}
+ },
+
+ // Minify definitions
+ min: {
+ dist: {
+ src: ['', ''],
+ dest: 'dist/jquery.github.min.js'
+ }
}
});
- grunt.registerTask('default', 'lint');
+ grunt.registerTask('default', 'lint min concat');
grunt.registerTask('travis', 'lint');
};
\ No newline at end of file
From c8b6779cd0ea0fd18333fbdbfa08cbdc71fadb76 Mon Sep 17 00:00:00 2001
From: Zeno Rocha
Date: Fri, 1 Mar 2013 00:53:50 -0300
Subject: [PATCH 006/101] removing old header
---
demo/index.html | 2 +-
dist/jquery.github.js | 136 ++++++++++++++++++++++++++++++++++++++
dist/jquery.github.min.js | 9 +++
src/jquery.github.js | 9 ---
4 files changed, 146 insertions(+), 10 deletions(-)
create mode 100644 dist/jquery.github.js
create mode 100644 dist/jquery.github.min.js
diff --git a/demo/index.html b/demo/index.html
index cd246d8..e131735 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -35,7 +35,7 @@ jQuery Github
-
+
-
+
+
-
+