Skip to content

Commit 66c4d3d

Browse files
committed
build: set dist directory field also on GitHub
1 parent d576e65 commit 66c4d3d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/node_modules/@stdlib/_tools/scripts/publish_packages.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,10 @@ function publish( pkg, clbk ) {
11361136
} catch ( error ) {
11371137
debug( 'Encountered an error when attempting to copy a boilerplate test file to `dist`: %s', error.message );
11381138
}
1139+
// Add `dist` directory to `package.json`:
1140+
if ( pkgJSON.directories ) {
1141+
pkgJSON.directories.dist = './dist';
1142+
}
11391143
}
11401144

11411145
if ( flags[ 'skip-upload' ] ) {
@@ -1270,9 +1274,6 @@ function publish( pkg, clbk ) {
12701274
delete pkgJSON.directories.benchmark;
12711275
delete pkgJSON.directories.example;
12721276
delete pkgJSON.directories.test;
1273-
if ( !isTopLevelNS ) {
1274-
pkgJSON.directories.dist = './dist';
1275-
}
12761277
}
12771278
writeFileSync( pkgJsonPath, JSON.stringify( pkgJSON, null, ' ' ).concat( '\n' ) );
12781279

0 commit comments

Comments
 (0)