Skip to content

Commit 363ddc8

Browse files
author
Gertjan Reynaert
committed
Merge pull request #13 from GertjanReynaert/gr-path-join
Add support for absolute paths
2 parents a4695f1 + b75072c commit 363ddc8

File tree

5 files changed

+5
-17
lines changed

5 files changed

+5
-17
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"cz-conventional-changelog": "^1.1.5",
5050
"eslint": "^2.2.0",
5151
"eslint-config-airbnb": "^6.0.1",
52+
"eslint-plugin-react": "^4.0.0",
5253
"mocha": "^2.3.4",
5354
"semantic-release": "^4.3.5"
5455
},

src/createSingleMessagesFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default ({
1313
throw new Error('Directory is required');
1414
}
1515

16-
const DIR = Path.join('./', directory, fileName);
16+
const DIR = Path.join(directory, fileName);
1717

1818
writeFileSync(DIR, JSON.stringify(messages, null, jsonSpaceIndentation));
1919
};

src/manageTranslations.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export default ({
4848
}
4949
},
5050
beforeReporting: () => {
51-
mkdirpSync(Path.join('./', translationsDirectory));
52-
mkdirpSync(Path.join('./', whitelistsDirectory));
51+
mkdirpSync(translationsDirectory);
52+
mkdirpSync(whitelistsDirectory);
5353
},
5454
provideLangTemplate: lang => {
5555
const languageFilename = `${lang}.json`;

src/readMessageFiles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default messagesDirectory => {
1111
throw new Error('messagesDirectory is required');
1212
}
1313

14-
const EXTRACTED_MESSAGES_DIR = Path.join('./', messagesDirectory, '/');
14+
const EXTRACTED_MESSAGES_DIR = Path.join(messagesDirectory, '/');
1515
const EXTRACTED_MESSAGES = Path.join(EXTRACTED_MESSAGES_DIR, '**/*.json');
1616

1717
return globSync(EXTRACTED_MESSAGES)

test/path.test.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)