le-components
v0.0.2
Published
Castle Component Library
Downloads
1
Readme
Castle Component Library
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
Currently Support Components
- le-mirror
- le-ascii-art
Getting Started
To start contributing, clone this repo to a new directory:
git clone https://github.com/castle-dev/le-components.git
cd le-components
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
Need help? Check out the docs here.
Naming Components
We use the le-
prefix for all components at Castle, to avoid collisions. Le because it's the end of Castle, and because Detroit has French roots.
Using this component
Script tag
- Put a script tag similar to this
<script src='https://unpkg.com/[email protected]/dist/castle.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 le-components --save
- Put a script tag similar to this
<script src='node_modules/my-name/dist/castle.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 le-components --save
- Add
{ name: 'castle' }
to your collections - Then you can use the element anywhere in your template, JSX, html etc