Skip to content

Commit

Permalink
Removed forward slash from path utilities.
Browse files Browse the repository at this point in the history
  • Loading branch information
neogeek committed May 30, 2017
1 parent ed55fab commit e7ff5a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/loaders.js
Expand Up @@ -7,7 +7,7 @@ const HANDLEBARS_PATTERN = /\.(hbs|handlebars)$/;
const JAVASCRIPT_PATTERN = /\.(js)$/;

const NODE_MODULE_DIRECTORIES = [
path.join(__dirname, '../node_modules'),
path.join(__dirname, '..', 'node_modules'),
path.join(process.cwd(), 'node_modules')
];

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

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

fs.stat(path, (err, stats) => {
fs.stat(filepath, (err, stats) => {

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

return resolve(path);
return resolve(filepath);

}

Expand Down
4 changes: 2 additions & 2 deletions lib/utils.js
Expand Up @@ -33,11 +33,11 @@ const findPackageFileInPath = input => {

if (stat.isFile()) {

return path.resolve(path.join(path.dirname(input), '/package.json'));
return path.resolve(path.join(path.dirname(input), 'package.json'));

} else if (stat.isDirectory()) {

return path.resolve(path.join(input, '/package.json'));
return path.resolve(path.join(input, 'package.json'));

}

Expand Down

0 comments on commit e7ff5a0

Please sign in to comment.