DEV Community

Pooja DebRoy
Pooja DebRoy

Posted on

Installing open wc

Installation

  1. Install Node js from the site https://nodejs.org/en/ and download the 14.17.6 LTS version for Mac

  2. Install yarn by opening your terminal and typing

npm install -g yarn
Enter fullscreen mode Exit fullscreen mode

you can check if yarn downloaded correctly by typing

yarn --version 
Enter fullscreen mode Exit fullscreen mode

from your home directory.

Once you have created a folder to house all of your projects

You will access that folder in your terminal and type

run npm init @open-wc
Enter fullscreen mode Exit fullscreen mode

You will create a hello-world boilerplate with a new project scaffold; a web component; all options checked for linting, testing, and demoing; does not use typescript; is named hello-world; and installed with yarn

Running the web component

Type

cd hello-world
Enter fullscreen mode Exit fullscreen mode

then type

npm run start
Enter fullscreen mode Exit fullscreen mode

and you're all set!

Top comments (0)