Skip to content

Commit

Permalink
package: set repository.directory
Browse files Browse the repository at this point in the history
  • Loading branch information
omsmith committed Feb 20, 2019
1 parent 9ab5eec commit 725b1a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/set-meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ for (const pkgName of pkgNames) {
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));

for (const field of COMMON_META) {
pkg[field] = topPkg[field];
pkg[field] = JSON.parse(JSON.stringify(topPkg[field]));
}

// https://github.com/npm/rfcs/pull/19
pkg.repository.directory = path.relative(topPkgDir, pkgDir);

fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, ' ') + '\n', 'utf8');
}

0 comments on commit 725b1a6

Please sign in to comment.