Skip to content

Remove Nutrient assets copy requirement from examples. #25

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

Merged
merged 11 commits into from
May 29, 2025

Conversation

miguelcalderon
Copy link
Contributor

@miguelcalderon miguelcalderon commented May 27, 2025

Part of https://pspdfkit.atlassian.net/browse/WEB-2319

Details

Remove the copy assets step from the Web examples where possible using strategies as close to each framework's recommended practices as possible.

These changes will be reflected in the corresponding "Getting started" guides in the Website repo as part of the same task.

Examples are being updated to match as closely as possible the new instructions in the guides, opting in some cases for the CDN approach, or for the framework-specific local installation approach as it seemed easier or more helpful for readers.

Some integrations like ASP.NET and Blazor have been left alone because of the nature of the integration, which would not involve the use of a JavaScript package manager so the complexity of the setup, if any, is already built in and trying to make it easier would involve providing more instructions than simply asking to copy the corresponding assets as it is now.

Others were already free of the assets copying step.

Some minor tasks have been included here, like updating some vulnerable dependencies and minor edits.

@miguelcalderon miguelcalderon self-assigned this May 27, 2025
@miguelcalderon miguelcalderon requested a review from veroo-m May 29, 2025 12:04
@miguelcalderon miguelcalderon marked this pull request as ready for review May 29, 2025 12:04
Copy link
Contributor

@veroo-m veroo-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment on lines +50 to +53
"predev": "npm run copy-files",
"dev": "tsc",
"start": "serve -l 8080 ./dist",
"prestart:dev": "node bin/verify-install.js",
"prestart:dev": "npm run copy-files",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need two different scripts to run npm run copy-files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pre prefixed scripts run before the start:dev and dev scripts respectively, that's the reason they're repeated, to make sure they run before building on each mode.

@miguelcalderon miguelcalderon merged commit 4b046a5 into main May 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants