Skip to content

Commit 1674deb

Browse files
Updated GPR post publish script
1 parent 372aed8 commit 1674deb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/gpr-post-publish.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
/**
2+
* Since this package has been published already on NPM before the GPR was
3+
* available, the package's json file will be altered before publishing to it.
4+
*/
15
const fileSystem = require("fs");
26
const pathUtility = require("path");
37
const packageFilePath = pathUtility.join(__dirname, "../package.json");
48
let packageJson = String(fileSystem.readFileSync(packageFilePath));
59
const package = JSON.parse(packageJson);
610
package.name = "@jeffreylanters/" + package.name;
11+
package.publishConfig = {
12+
registry: "https://npm.pkg.github.com/jeffreylanters",
13+
};
714
packageJson = JSON.stringify(package);
815
fileSystem.writeFileSync(packageFilePath, packageJson);

0 commit comments

Comments
 (0)