0.0.3 • Published 6 years ago

collective-webcomponents v0.0.3

Weekly downloads
14
License
-
Repository
github
Last release
6 years ago

Collective Webcomponents

Webcomponents for Collective made with Stencil

Getting Started

To start building a new web component using Stencil, clone this repo to a new directory:

git clone https://github.com/builder/collective-webcomponents.git
cd collective-webcomponents

and run:

npm install
npm start

To watch for file changes during develop, run:

npm run dev

To build the component for production, run:

npm run build

To run the unit tests for the components, run:

npm test

Try using Visual Studio Code to view and edit this code, it has best in class typescript/tsx support.

Need help? Check out the stencil docs here.

Using these components

Script tag

  • Publish to NPM
  • Put a script tag similar to this <script src='https://unpkg.com/collective-webcomponents@0.0.1/dist/collectivewebcomponents.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

Node Modules

  • Run npm install collective-webcomponents --save
  • Put a script tag similar to this <script src='node_modules/collective-webcomponents/dist/collectivewebcomponents.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

In a stencil-starter app

  • Run npm install collective-webcomponents --save
  • Add an import to the npm packages import collective-webcomponents;
  • Then you can use the element anywhere in your template, JSX, html etc