-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Suggestion: Add a demo that consumes NPM package #3
Comments
Well, I actually have another project using it as dependency and it works just fine so I don't there is an issue ...for typescript at least. However, a JS project would probably be broken indeed. I like that relative import though, it's very convinient during development or bugfixing rather than always re-publishing, re-importing, waiting for the pipelines and avoiding browser caching issues. Perhaps I'll make a separate example project. I'll leave this ticket open for now when I have more time. |
PS: thanks for the feedback |
PS2: there is also the demo fetching the lib from the CDN: https://webauthn.passwordless.id/demos/example-cdn.html The import is actually quite simple: I bumped the version to |
Well, I have the feeling the README is enough to know how to install and use the package. I'll close the ticket for now. If anybody else thinks a demo is necessary, just mention it here to reopen the ticket. The slight concern I have for such a demo is also what tooling to use. There are currently so many frameworks and tool chains that I fear if making a demo with esbuild for example, the next would come and ask for a demo using vite or parcel or nuxt or tsc or whatever fancy build toolchain / framework they use. I mean ...it's relatively trivial to use this package after all. Just by copy pasting the code snippets on the readme. |
At the time this issue was created there was not a demo which was validating the package. It was assumed it could be consumed although all the existing demos were linking local files. The intention was that by building a demo which uses the package instead of directly linking local files, it acts as type of integration test to verify the integrity of the package. Things to verify
If you are using URL imports to verify the package. That is definitely improvement.
I think you're grouping all tooling / frameworks at interchangeable. Although I think you have updated demos to use a more robust method so yes is likely is ok to close. |
Related to #2. I think there actually is an issue with NPM package but it was never diagnosed because the neither of the demo applications use the NPM package. The both reference the script via relative path such as:
webauthn/demos/js/playground.js
Line 1 in 9d47c51
I think the current demos function by direction serving the contents of the demos folder. However, I think to use the NPM package you would need the demo to have some build step which installs the package and then generates a site from it.
Certainly a more complex, but it would provide value that the package works so I think it could be good investment.
The text was updated successfully, but these errors were encountered: