Permalink
Browse files

Merge pull request #3 from epeli/master

Package for Node.js
  • Loading branch information...
2 parents 3b08bb6 + 4431b83 commit bf0d7ec50efe28605ff250421a3da2405ba191e8 @arshaw committed Feb 13, 2012
Showing with 20 additions and 3 deletions.
  1. +15 −0 package.json
  2. +5 −3 src/xdate.js
View
@@ -0,0 +1,15 @@
+{
+ "name" : "xdate"
+ , "version": "0.5.0"
+ , "author": "Adam Shaw"
+ , "homepage": "http://arshaw.com/xdate/"
+ , "description": "A Modern JavaScript Date Library"
+ , "bugs": {
+ "url": "https://github.com/arshaw/xdate/issues"
+ }
+ , "repository":
+ { "type": "git"
+ , "url": "https://github.com/arshaw/xdate.git"
+ }
+ , "main": "./src/xdate"
+}
View
@@ -1,4 +1,3 @@
-
/**
* @preserve XDate v@VERSION
* Docs & Licensing: http://arshaw.com/xdate/
@@ -794,7 +793,10 @@ function zeroPad(n, len) {
return n;
}
-
+// Export for Node.js
+if (typeof module !== 'undefined' && module.exports) {
+ module.exports = XDate;
+}
return XDate;
-})(Date, Math, Array);
+})(Date, Math, Array);

0 comments on commit bf0d7ec

Please sign in to comment.