Skip to content

Commit 9047c67

Browse files
committed
build: add npmScope and enforce scoped package names
- Add npmScope configuration in nx.json to set default scope - Ensure package names use scoped naming convention in build script
1 parent 328bc90 commit 9047c67

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

nx.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@
4545
}
4646
}
4747
},
48+
"npmScope": "x-labs-myid",
4849
"useLegacyCache": true
4950
}

tools/scripts/build-finish.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ function cleanPackage() {
5454
// we don't need module or type properties at the moment
5555
delete packageJson['module'];
5656
delete packageJson['type'];
57+
58+
// Pastikan nama package tetap menggunakan scoped name
59+
if (packageName === 'rootbeer') {
60+
packageJson.name = '@x-labs-myid/rootbeer';
61+
}
62+
if (packageName === 'phone-number-field') {
63+
packageJson.name = '@x-labs-myid/phone-number-field';
64+
}
65+
5766
fs.writeFileSync(packageJsonPath, serializeJson(packageJson));
5867

5968
const angularNpmIgnorePath = path.resolve(rootDir, 'dist', 'packages', packageName, 'angular', '.npmignore');

0 commit comments

Comments
 (0)