Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

Commit

Permalink
Merge branch 'toadzky-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ericf committed Feb 6, 2016
2 parents 0a56e3c + 5f2fe57 commit 33689e3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,16 @@ export default function () {
file.metadata['react-intl'] = {messages: descriptors};

if (opts.messagesDir && descriptors.length > 0) {
// Make sure the relative path is "absolute" before
// joining it with the `messagesDir`.
let relativePath = p.join(
path.sep,
p.relative(process.cwd(), filename)
);

let messagesFilename = p.join(
opts.messagesDir,
p.dirname(p.relative(process.cwd(), filename)),
p.dirname(relativePath),
basename + '.json'
);

Expand Down

0 comments on commit 33689e3

Please sign in to comment.