Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add homepage to published package #214

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 29 additions & 27 deletions scripts/prepublishOnly.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,27 @@ function generatePackageJson() {
writeJsonSync(`${packageJsonPath}.tmp`, tmpPackageJson, { spaces: 2 })

const {
name,
description,
dependencies,
peerDependencies,
peerDependenciesMeta,
version,
files,
exports: exports_,
// NOTE: We explicitly don't want to publish the type field. We create a separate package.json for `src/_cjs` and `src/_esm` that has the type field.
// type,
authors,
dependencies,
description,
exports: exports_,
files,
homepage,
keywords,
license,
main,
module,
name,
peerDependencies,
peerDependenciesMeta,
repository,
sideEffects,
types,
typings,
typesVersions,
sideEffects,
license,
repository,
authors,
keywords,
typings,
version,
} = tmpPackageJson

// Generate proxy packages for each export.
Expand Down Expand Up @@ -79,25 +80,26 @@ function generatePackageJson() {
writeJsonSync(
packageJsonPath,
{
name,
description,
// type,
authors,
dependencies,
peerDependencies,
peerDependenciesMeta,
version,
files: files_,
description,
exports: exports_,
// type,
files: files_,
homepage,
keywords,
license,
main,
module,
name,
peerDependencies,
peerDependenciesMeta,
repository,
sideEffects,
types,
typings,
typesVersions,
sideEffects,
license,
repository,
authors,
keywords,
typings,
version,
},
{ spaces: 2 }
)
Expand Down
Loading