Skip to content

Commit

Permalink
play nicely within an Ender build
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Apr 4, 2012
1 parent 6a5d0d4 commit f8afa2e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions ender.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$.ender({ moment: require('moment') })
3 changes: 2 additions & 1 deletion moment.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,8 @@
if (hasModule) {
module.exports = moment;
}
if (typeof window !== 'undefined') {
/*global ender:false */
if (typeof window !== 'undefined' && typeof ender === 'undefined') {
window.moment = moment;
}
/*global define:false */
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"author": "Tim Wood <[email protected]> (http://timwoodcreates.com/)",
"keywords": [
"moment",
"date"
"date",
"ender"
],
"main": "./moment.js",
"engines": {
Expand All @@ -28,5 +29,6 @@
"jshint" : "latest",
"uglify-js" : "latest",
"nodeunit" : "latest"
}
},
"ender": "./ender.js"
}

0 comments on commit f8afa2e

Please sign in to comment.