Skip to content

Commit

Permalink
Fixing relative paths in the metadata output
Browse files Browse the repository at this point in the history
  • Loading branch information
SlexAxton committed Jun 2, 2013
1 parent 44eddf9 commit 6a7571a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/generate-meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ file.walkSync(viewRoot, function (start, dirs, files) {
}
metadata.deps = deps;

metadata.path = (start + '/' + file).replace(__dirname, '');
metadata.amdPath = metadata.path.replace('/feature-detects', 'test').replace(/\.js$/i, '');
var baseDir = __dirname.replace(/lib$/, '');
metadata.path = './' + (start + '/' + file).replace(baseDir, '');
metadata.amdPath = metadata.path.replace(/^\.\/feature\-detects/, 'test').replace(/\.js$/i, '');

if (!metadata.name) {
metadata.name = metadata.amdPath;
Expand Down

0 comments on commit 6a7571a

Please sign in to comment.