Permalink
Browse files

Adding convenience grabbing of source for Node.js users that want to …

…easily export node-localize to the browser.
  • Loading branch information...
1 parent b2cf22d commit 14bdc35e38a9b1c104e3be6bd1eb965738517e33 David Ellis committed Feb 10, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/localize.js
View
@@ -401,5 +401,6 @@ function Localize(translations, dateFormats, defaultLocale) {
// Publish as a module, if in a CommonJS environment
if(typeof(module) != 'undefined') {
+ Localize.source = fs.readFileSync(require.resolve('localize'), 'utf8'); // Append a source string to the Localize object for easy exporting to the client
module.exports = Localize;
}

0 comments on commit 14bdc35

Please sign in to comment.