Browse files

- remove smoosh in devDependency list

  • Loading branch information...
1 parent e99788b commit c2d94274d83218b1422c68396149c56e2698e239 @ded committed Jan 13, 2012
Showing with 5 additions and 8 deletions.
  1. +1 −1 Makefile
  2. +2 −2 Makefile.js
  3. +1 −1 calender.min.js
  4. +1 −4 package.json
View
2 Makefile
@@ -1,2 +1,2 @@
boosh:
- node Makefile.js
+ smoosh make Makefile.js
View
4 Makefile.js
@@ -1,4 +1,4 @@
-require('smoosh').config({
+{
"JAVASCRIPT": {
"DIST_DIR": "./",
"calender": [
@@ -22,4 +22,4 @@ require('smoosh').config({
, "laxbreak": true
, "plusplus": false
}
-}).run().build().analyze()
+}
View
2 calender.min.js
@@ -3,4 +3,4 @@
* copyright Dustin Diaz @ded 2011 | License MIT
* https://github.com/ded/calEnder
*/
-!function(a){function d(a){return a%4===0&&a%100!==0||a%400===0}function e(a,b){return[31,d(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]}function f(a){return c.indexOf(a)+1}function g(d,e){var g=this;this.options=e||{},this.$input=a(d).first(),this.$calendar=a(b).appendTo("body"),this.$calendar.delegate("tbody td","mouseover",function(){a(this).closest("tbody").find("td:nth-child("+(this.cellIndex+1)+")").addClass("hover")}),a(document).bind("click",function(a){g.$calendar.removeClass("active")}),this.$calendar.bind("mousedown click",function(a){a.stopPropagation(),a.preventDefault()}),this.$calendar.delegate("tbody td","mouseout",function(){a(this).closest("tbody").find("td:nth-child("+(this.cellIndex+1)+")").removeClass("hover")}),this.$calendar.delegate("tbody td:not(.inactive)","click.day",function(b){var c=a(this).html();g.$input.val([f(g.$calendar.find(".date-current-month").html()),c,g.$calendar.find(".date-current-year").html()].join("-")),g.$calendar.removeClass("active")}),this.$calendar.delegate(".date-month-previous","click",function(a){var b=parseFloat(g.$calendar.find(".date-current-year").html()),d=f(g.$calendar.find(".date-current-month").html())-1;--d==-1&&--b&&(d=11),g.setDate(c[d]+" 1,"+b)}),this.$calendar.delegate(".date-month-next","click",function(b){var d=parseFloat(g.$calendar.find(".date-current-year").html()),e=f(a(".date-current-month").html());e==12&&++d&&(e=0),g.setDate(c[e]+" 1,"+d)}),this.setDate((this.options.date||new Date).toDateString())}var b="<div class='date'> <table> <thead> <tr class='date-header'> <th class='date-nav date-month-previous'>&#8227;</th> <th colspan='5' class='date-month-year'> <span class='date-current-month'></span> <span class='date-current-year'></span></th> <th class='date-nav date-month-next'>&#8227;</th> </tr> <tr class='date-daysofweek'> <th>S</th> <th>M</th> <th>T</th> <th>W</th> <th>R</th> <th>F</th> <th>S</th> </tr> </thead> <tbody class='date-days'></tbody> </table></div>",c=["January","February","March","April","May","June","July","August","September","October","November","December"];g.prototype.setDate=function(b){var d=new Date(b),f=(new Date(d.getFullYear(),d.getMonth(),1)).getDay(),g=e(d.getMonth()?d.getFullYear():d.getFullYear()-1,d.getMonth()?d.getMonth()-1:d.getMonth()),h=[],i=1,j=0,k=g-f,l=e(d.getYear(),d.getMonth()),m=Math.floor((l+f-7)/7),n=0;this.$calendar.find(".date-current-year,.date-current-month,tbody.date-days").empty(),this.$calendar.find(".date-current-year").html(d.getFullYear()),this.$calendar.find(".date-current-month").html(c[d.getMonth()]),h.push("<tr>");while(k<g)h.push('<td class="inactive">'+ ++k+"</td>");while(f<7)h.push("<td>"+ ++j+"</td>"),f++;h.push("</tr>");for(;n<m;n++){h.push("<tr>");var o=0;while(o<7)h.push("<td>"+ ++j+"</td>"),o++;h.push("</tr>")}if(j<l){h.push("<tr>"),n=0;var p=j+7,q=0;while(n<7)j<l?h.push("<td>"+ ++j+"</td>"):h.push('<td class="inactive">'+ ++q+"</td>"),n++;h.push("</tr>")}this.$calendar.find("tbody.date-days").append(h.join(""));var r=new Date;d.getMonth()==r.getMonth()&&d.getFullYear()==r.getFullYear()&&this.$calendar.find(".date tbody.date-days td").each(function(b){b.innerHTML==r.getDate()&&!a(b).hasClass("inactive")&&a(b).addClass("today")})},a.ender({calender:function(b){a(this).forEach(function(c){var d=a(c),e=d.offset(),f=new g(c,b);d.bind("focus click",function(a){a.stopPropagation(),f.$calendar.css({left:e.left,top:e.top+e.height}).addClass("active")}).bind("keydown",function(a){a.keyCode==9&&f.$calendar.removeClass("active")})})}},!0)}(ender)
+!function(a){function c(a){return a%4===0&&a%100!==0||a%400===0}function d(a,b){return[31,c(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]}function e(c,d){var e=this;this.options=d||{},this.months=(this.options.months||"January February March April May June July August September October November December").split(" "),this.$input=a(c).first(),this.$calendar=a(b).appendTo("body"),this.formatDate=this.options.formatDate||function(a,b,c){return[b,c,a].join("-")},this.weekStart=this.options.weekStart||0;var f=(this.options.daysOfWeek||"S M T W T F S").split(" ");f=f.slice(this.weekStart).concat(f.slice(0,this.weekStart)),this.$calendar.find(".date-daysofweek").append("<th>"+f.join("</th><th>")+"</th>"),this.$calendar.delegate("tbody td","mouseover",function(){a(this).closest("tbody").find("td:nth-child("+(this.cellIndex+1)+")").addClass("hover")}),a(document).bind("click",function(a){e.$calendar.removeClass("active")}),this.$calendar.bind("mousedown click",function(a){a.stopPropagation(),a.preventDefault()});var g=function(a){return e.months.indexOf(a)+1};this.$calendar.delegate("tbody td","mouseout",function(){a(this).closest("tbody").find("td:nth-child("+(this.cellIndex+1)+")").removeClass("hover")}),this.$calendar.delegate("tbody td:not(.inactive)","click.day",function(b){var c=a(this).html();e.$input.val(e.formatDate(e.$calendar.find(".date-current-year").html(),g(e.$calendar.find(".date-current-month").html()),c)),e.$calendar.removeClass("active")}),this.$calendar.delegate(".date-month-previous","click",function(a){var b=parseFloat(e.$calendar.find(".date-current-year").html()),c=g(e.$calendar.find(".date-current-month").html())-1;--c==-1&&--b&&(c=11),e.setDate([b,c+1,1].join("-"))}),this.$calendar.delegate(".date-month-next","click",function(a){var b=parseFloat(e.$calendar.find(".date-current-year").html()),c=g(e.$calendar.find(".date-current-month").html());c==12&&++b&&(c=0),e.setDate([b,c+1,1].join("-"))}),this.setDate((this.options.date||new Date).toDateString())}var b="<div class='date'> <table> <thead> <tr class='date-header'> <th class='date-nav date-month-previous'>&#8227;</th> <th colspan='5' class='date-month-year'> <span class='date-current-month'></span> <span class='date-current-year'></span></th> <th class='date-nav date-month-next'>&#8227;</th> </tr> <tr class='date-daysofweek'> </tr> </thead> <tbody class='date-days'></tbody> </table></div>";e.prototype.setDate=function(b){var c=new Date(b),e=(new Date(c.getFullYear(),c.getMonth(),1)).getDay(),f=d(c.getMonth()?c.getFullYear():c.getFullYear()-1,c.getMonth()?c.getMonth()-1:c.getMonth()),g=[],h=1,i=0,j=this.weekStart-(e<this.weekStart?7:0),k=f-e+j,l=d(c.getYear(),c.getMonth()),m=Math.floor((l+e-7-j)/7),n=0;this.$calendar.find(".date-current-year,.date-current-month,tbody.date-days").empty(),this.$calendar.find(".date-current-year").html(c.getFullYear()),this.$calendar.find(".date-current-month").html(this.months[c.getMonth()]),g.push("<tr>");while(k<f)g.push('<td class="inactive">'+ ++k+"</td>");while(e<7+j)g.push("<td>"+ ++i+"</td>"),e++;g.push("</tr>");for(;n<m;n++){g.push("<tr>");var o=0;while(o<7)g.push("<td>"+ ++i+"</td>"),o++;g.push("</tr>")}if(i<l){g.push("<tr>"),n=0;var p=i+7,q=0;while(n<7)i<l?g.push("<td>"+ ++i+"</td>"):g.push('<td class="inactive">'+ ++q+"</td>"),n++;g.push("</tr>")}this.$calendar.find("tbody.date-days").append(g.join(""));var r=new Date;c.getMonth()==r.getMonth()&&c.getFullYear()==r.getFullYear()&&this.$calendar.find(".date tbody.date-days td").each(function(b){b.innerHTML==r.getDate()&&!a(b).hasClass("inactive")&&a(b).addClass("today")})},a.ender({calender:function(b){a(this).forEach(function(c){var d=a(c),f=d.offset(),g=new e(c,b);d.bind("focus click",function(a){a.stopPropagation(),g.$calendar.css({left:f.left,top:f.top+f.height}).addClass("active")}).bind("keydown",function(a){a.keyCode==9&&g.$calendar.removeClass("active")})})}},!0)}(ender)
View
5 package.json
@@ -4,7 +4,7 @@
, "version": "0.0.3"
, "homepage": "https://github.com/ded/calEnder"
, "author": "Dustin Diaz <dustin@dustindiaz.com> (http://dustindiaz.com)"
- , "keywords": ["ender", "calendar", "date", "datepicker", "datechooser", ""]
+ , "keywords": ["ender", "calendar", "date", "datepicker", "datechooser"]
, "main": "./calender.js"
, "ender": "noop"
, "repository": {
@@ -17,7 +17,4 @@
, "scripts": {
"build": "node Makefile.js"
}
- , "devDependencies": {
- "smoosh": "*"
- }
}

0 comments on commit c2d9427

Please sign in to comment.