Beginning Shadow DOM API by 2024
Author:2024
Language: eng
Format: azw3, mobi, epub
Published: 2024-03-28T18:27:55.567000+00:00
ChapTer 2 CreaTIng ComponenTs
6. Browse to http://localhost:5173/ to view the index file
we just created â if all is well, we should see something akin to
that shown in Figure 2-4.
Figure 2-4. The original demo, now running under Vite
Do not be alarmed if you donât see any difference from the original version of this demo â that is to be expected! Vite needs an index.html file to work correctly â
rather than creating afresh, we can reuse the one we built earlier in this chapter.
Weâre making good progress, but we still have more to go! Go and have a breather, get a drink, and letâs continue with the next part of the demo when youâre ready.
66
ChapTer 2 CreaTIng ComponenTs
The next task is to push our code into a repository from which we can publish to npm. I used GitHub for this demo; if you donât already have a suitable repository, you can sign up at https://github.com/signup. You will need to create a repository area then; please make note of the details you use so you can reference them later! As the number of files we need to push is minimal, we can simply drag and drop all of them (excluding the node_modules folder) via the upload facility at https://github.com/XXX/
YYY/upload/main, where XXX is the name of your account and YYY is the name of your repository.
I have not gone into too much detail here, as I assume you will be familiar with the basics of uploading code to git â you can do it
manually via drag and drop, from the command line, or via a subversion application. any method is fine: go with whichever you prefer!
Assuming you are successful, then letâs continue with the next part of the process.
PART 2: PUBLISHING THE COMPONENT
publishing to npm is easy â we only need to run a few commands to complete the process:
1. Crack open a command prompt or revert to the one from
the previous demo, then make sure weâre still in the same
component folder.
2. at the prompt, enter npm login -access=public, then
press enter.
3. npm will prompt you for your username, password, and email
address â go ahead and enter the details you created before
the start of the previous exercise.
67
ChapTer 2 CreaTIng ComponenTs
4. once done, enter npm publish âaccess=public at the
prompt, and press enter â if all is well, you will see something
similar to this appear:
npm notice
npm notice @shadowdombook/alert- [email protected]
npm notice === Tarball Contents ===
npm notice 15B README.md
npm notice 675B index.html
npm notice 738B package.json
npm notice 734B script.js
npm notice 506B styles.css
npm notice === Tarball Details ===
npm notice name: @shadowdombook/alert-
component
npm notice version: 0.1.0-alpha
npm notice filename: @shadowdombook/alert-
component-0.1.0- alpha.tgz
npm notice package size: 1.4 kB
npm notice unpacked size: 2.7 kB
npm notice shasum: a1eeaa446b703c5c1f1a8a715c745904803874cf
npm notice integrity: sha512-
nDr91vxi1BmVO[...]BoooaNydIVfaA==
npm notice total files: 5
npm notice
npm notice Publishing to https://registry.npmjs.org/
+ @shadowdombook/[email protected]
If you have 2Fa enabled, you may be prompted to supply a token â
you can do this using the same command as before but append
-otp=<your code> at the end.
68
Download
Beginning Shadow DOM API by 2024.mobi
Beginning Shadow DOM API by 2024.epub
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12645)
Hello! Python by Anthony Briggs(9948)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9825)
The Mikado Method by Ola Ellnestam Daniel Brolund(9814)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(9711)
Dependency Injection in .NET by Mark Seemann(9369)
Hit Refresh by Satya Nadella(8855)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8334)
The Kubernetes Operator Framework Book by Michael Dame(7940)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7811)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7791)
Exploring Deepfakes by Bryan Lyon and Matt Tora(7728)
Grails in Action by Glen Smith Peter Ledbrook(7722)
Practical Computer Architecture with Python and ARM by Alan Clements(7673)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7639)
Robo-Advisor with Python by Aki Ranin(7625)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7591)
Building Low Latency Applications with C++ by Sourav Ghosh(7514)
Svelte with Test-Driven Development by Daniel Irvine(7493)
