DEV Community


Posted on


Creating an Open-wc Boilerplate

Downloading an IDE(Visual Studio Code):
Click on the link above to download Visual Studio Code
The program will ask for permission before downloading. Grant permission and follow the directions within the program.

Install Node.js:
Select Node TLS version (14.17.5)
Wait for file to download and then open and follow instructions
After installation you can run the command "node -v" to check what version you have downloaded. If you get version 14, you are all set!

Download npm or yarn:
Npm should be included with node.js
[Link] for more information
Open the command prompt on your computer
Type in “npm install -g yarn” to get started with install
Optional Type in “yarn set version berry” to download all versions of Yarn from 2 onwards
Optional Type in “yarn set version latest” to update to the newest versions

Creating the open-wc boilerplate:
Type in the command: npm init @open-wc
Select a new project scaffold
Select a web component
Check the option that includes linting, testing, and demoing
Select “do not user typescript”
Name file “hello-world” ** make sure everything is lowercase**
Select to install using yarn

Discussion (0)