Skip to content

Commit e7ff5a0

Browse files
committed
Removed forward slash from path utilities.
1 parent ed55fab commit e7ff5a0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/loaders.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const HANDLEBARS_PATTERN = /\.(hbs|handlebars)$/;
77
const JAVASCRIPT_PATTERN = /\.(js)$/;
88

99
const NODE_MODULE_DIRECTORIES = [
10-
path.join(__dirname, '../node_modules'),
10+
path.join(__dirname, '..', 'node_modules'),
1111
path.join(process.cwd(), 'node_modules')
1212
];
1313

@@ -25,13 +25,13 @@ const NODE_MODULE_DIRECTORIES = [
2525
const findPackagePath = pkg =>
2626
Promise.all(NODE_MODULE_DIRECTORIES.map(dir => new Promise(resolve => {
2727

28-
const path = `${dir}/${pkg}`;
28+
const filepath = path.join(dir, pkg);
2929

30-
fs.stat(path, (err, stats) => {
30+
fs.stat(filepath, (err, stats) => {
3131

3232
if (!err && stats.isDirectory()) {
3333

34-
return resolve(path);
34+
return resolve(filepath);
3535

3636
}
3737

lib/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ const findPackageFileInPath = input => {
3333

3434
if (stat.isFile()) {
3535

36-
return path.resolve(path.join(path.dirname(input), '/package.json'));
36+
return path.resolve(path.join(path.dirname(input), 'package.json'));
3737

3838
} else if (stat.isDirectory()) {
3939

40-
return path.resolve(path.join(input, '/package.json'));
40+
return path.resolve(path.join(input, 'package.json'));
4141

4242
}
4343

0 commit comments

Comments
 (0)