New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

create-wc

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-wc

A super simple code generator for web components.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

create-wc

A super simple code generator for web components.

Usage

Supply the HTML API for the web component in quotes:

npm init wc "<my-component foo='bar'>"

or

npx create-wc "<my-component hi='mom'>"

Multiple arguments can be passed to generate multiple components:

npm init wc "<comp-one>" "<comp-two>"

Templates

The template can be changed by specifying the --lib flag with one of the following options. The options will persist, so you only need to supply it once.

To be implemented:

  • Vanilla JavaScript
  • Vanilla TypeScript
  • LitElement JavaScript
  • LitElement TypeScript: --lib=lit.ts
  • Stencil JavaScript
  • Stencil TypeScript

Ex: npm init wc "<hello-world foo='bar'>" --lib=lit.ts

import {html, css, LitElement} from 'lit';
import {customElement, property} from 'lit/decorators.js';

@customElement('hello-world')
export class HelloWorld extends LitElement {
  static styles = css`p { color: blue }`;

  @property()
  foo = 'bar';

  render() {
    return html`<p>Hello, world!</p>`;
  }
}

Keywords

FAQs

Package last updated on 25 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc