gt-test-component
v5.0.9
Published
greytHR Web Components
Downloads
1
Readme
![Build with Web-Component]
Getting Started
To start building a web component using Stencil, clone this repo to a new directory:
git clone https://github.com/<repo-name>.git my-component
cd <navigate to repo>
and run:
npm install
npm start
To build the component for production, run:
npm run build
To run the unit tests for the components, run:
npm test
Naming Components
When creating new component tags, we recommend not using stencil
in the component name (ex: <stencil-datepicker>
). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic generated web components use the prefix ion
.
Project structure
The project's structure will look similar to this:
liber
├── src
│ ├── components
│ │ └── pre-sample
│ │ ├── pre-component.css
│ │ ├── pre-component.e2e.ts
│ │ ├── pre-component.spec.ts
│ │ └── pre-component.tsx
│ ├── shared
│ ├── assets
│ ├── index.html
│ ├── index.ts
├── package.json
└── stencil.config.ts