Skip to content

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
miguelcalderon added a commit that referenced this pull request Jul 28, 2025
* Remove unnecessary skipLibCheck.

* Remove copy assets step from Electron example.

* Remove unused dependencies in Electron.

* Remove copying from GatsbyJS example.

* Update Laravel example, remove copy assets step.

* Make copy assets strategy part of the integration.

* Remove unused arg (NextJS).

* Remove copy assets strategy from NuxtJS example (via CDN).

* Update Svelte example.

* Use local updated document in Svelte-Kit example.

* Update Typescript example.
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.

3 participants