goodt-ui
v1.17.1
Published
Goodt UI Web components
Downloads
103
Readme
Introduction
This is a project for building a standalone Web Components using Stencil.
This project contains Goodt web components ("gtc" further) to use in inner and external products of our company.
All GTC don't contain any dependencies, including CSS-framework. But GTC use CSS classes of goodt-framework-css
assuming the goodt-framework-css
have to included in the host application.
Getting Started
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
Need help? Check out our docs here.
Publish release
Run npm run release
and following the instructions.
It will generate CHANGELOG.md
(via hook version
), update the project version, add the tag and commit it all to the git-repository.
Naming Components
All components have to be named with the prefix "gtc-" (GoodT Components). Read docs for details.
Using this component
Script tag (have not tested)
- Put a script tag similar to this
<script type='module' src='https://unpkg.com/[email protected]/dist/my-component.esm.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
Node Modules (Doesn't work)
- Run
npm install my-component --save
- Put a script tag similar to this
<script type='module' src='node_modules/goodt-ui/dist/esm/goodt-ui.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
Import
- Add an import to the npm packages
require("goodt-ui/dist/esm/goodt-ui.js");
- Then you can use the element anywhere in your template, JSX, html etc