Open Web Components is very accessible for anyone interested in trying various ideas for building web components.
Tools Needed
- A laptop
- Node JS/ npm
- VS Code IDE
Steps for getting started
Download and install the correct versions of node js (https://nodejs.org/en/) and visual studio code (https://code.visualstudio.com/download)
Follow the instructions on the links to download nodejs and vs code correctly. To check if the download was successful. Type node -v
on the terminal to check the version.
Installing Yarn
Install yarn using the link [https://yarnpkg.com/] to your PC.
Open the link and type the following command in your terminal
npm install - global yarn
Incase you run into permission issues just add sudo
infront of your previous command. sudo npm install -global yarn
Installing Open WC Boilerplate
- Create a local folder on your PC for your projects
- Open your terminal and Navigate to the folder
- Run
npm init@open-wc
- Once the download begins you will be prompted with four questions
- Scaffold a New Project
- Select "Web Components to scaffold
- Toggle through each of the next options Linting, Testing, Demoing using the arrow key and select each
- Select No for Typescript
- Type lowercase "hello-world" for your tag name
- Click yes for disk
- Click yes with yarn for installing all the dependencies
You are all set now and Enjoy your web programming!!!
Top comments (0)