Skip to content
Browse files

now using resolve to get locale js file paths

  • Loading branch information...
1 parent a68e96e commit e9aadfb8fdd95d13979168d99cae447048fbc8b5 @gushov committed Dec 28, 2012
Showing with 7 additions and 7 deletions.
  1. 0 bin/grunt-messageformat
  2. +4 −4 lib/compiler.js
  3. +3 −3 package.json
View
0 bin/grunt-messageformat 100644 → 100755
File mode changed.
View
8 lib/compiler.js
@@ -13,9 +13,9 @@ var localeScriptString;
function readLocaleFile(locale, cb) {
- var localeFile = path.join(__dirname, '..',
- 'node_modules', 'messageformat', 'locale',
- locale + '.js');
+ var mfPath = require.resolve('messageformat');
+ var localeFile = path.join(path.dirname(mfPath),
+ 'locale', locale + '.js');
fs.readFile(localeFile, 'utf8', cb);
}
@@ -76,7 +76,7 @@ function parseFiles(inputdir, locale, namespace, files, cb) {
});
- }, cb);
+ }, cb);
}
View
6 package.json
@@ -1,7 +1,7 @@
{
"name": "grunt-messageformat",
"description": "messageformat.js's command line tool ported to a grunt plugin",
- "version": "0.1.0",
+ "version": "0.1.1",
"homepage": "https://github.com/gushov/grunt-messageformat",
"author": {
"name": "Gus Hovland",
@@ -32,8 +32,8 @@
"messageformat": "~0.1.5",
"glob": "~3.1.14",
"underscore": "~1.4.3",
- "async": "~01.22"
- }
+ "async": "~0.1.22"
+ },
"devDependencies": {
"grunt": "~0.3.17"
},

0 comments on commit e9aadfb

Please sign in to comment.
Something went wrong with that request. Please try again.