DEV Community

Cover image for Installing Open-WC on Windows 10
Neel
Neel

Posted on • Updated on

Installing Open-WC on Windows 10

Everything involving Open Web Components will be using Noje.js. The instructions to get Node.js installed are as follows:

  1. Go to nodejs.org.
  2. Look under the "Download for Windows" heading.
  3. Click on left button to install the LTS version.

The Node installation should come with the package manager npm. You should also install yarn, an alternative to npm. Using npm, which can be opened by typing in "npm" in Windows search, you should execute this command to install yarn:

npm install -g yarn
Enter fullscreen mode Exit fullscreen mode

All your projects will be located in the following directory, which should be created if you have not so:
C:Users\user\Documents\git\edtechjoker

In that directory, using npm, execute the command npm init @ open-wc to initialize Open-WC. That should lead you to prompts to create a new project, which should have:

  • a web component
  • options for linting, testing, and demoing checked
  • created without typescript
  • be named hello-world
  • installed using yarn

To check to see if you have done everything right, type the following commands to go into the hello-world directory, and fire up your webpage.

cd hello-world
npm start
Enter fullscreen mode Exit fullscreen mode

Note: The hello-world directory must be in lowercase, as it is not just a naming convention but how the project functions.

Top comments (0)