le-components
v0.0.2
Published
Castle Component Library
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-componentsand run:
npm install
npm startTo watch for file changes during develop, run:
npm run devTo build the component for production, run:
npm run buildTo run the unit tests for the components, run:
npm testNeed 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
