Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup some of the npm package code. make it work with closure compiler

  • Loading branch information...
commit 30e1ece937971cdceadc4d0a67f2505db141d826 1 parent bf0d7ec
@arshaw authored
Showing with 23 additions and 15 deletions.
  1. +4 −1 Makefile
  2. +1 −0  build/externs.js
  3. +14 −14 package.json
  4. +4 −0 src/xdate.js
View
5 Makefile
@@ -17,7 +17,10 @@ xdate:
| ${VERSION_SED} \
| ${DATE_SED} \
> ${BUILD_DIR}/${DEVELOPMENT_FILE}
- @java -jar ${BUILD_DIR}/compiler.jar --warning_level VERBOSE --jscomp_off checkTypes \
+ @java -jar ${BUILD_DIR}/compiler.jar \
+ --warning_level VERBOSE \
+ --jscomp_off checkTypes \
+ --externs ${BUILD_DIR}/externs.js \
--js ${BUILD_DIR}/${DEVELOPMENT_FILE} \
> ${BUILD_DIR}/${PRODUCTION_FILE}
@mkdir -p ${DIST_DIR}
View
1  build/externs.js
@@ -0,0 +1 @@
+var module
View
28 package.json
@@ -1,15 +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"
-}
+ "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.js"
+}
View
4 src/xdate.js
@@ -793,10 +793,14 @@ function zeroPad(n, len) {
return n;
}
+
+
// Export for Node.js
if (typeof module !== 'undefined' && module.exports) {
module.exports = XDate;
}
+
+
return XDate;
})(Date, Math, Array);
Please sign in to comment.
Something went wrong with that request. Please try again.