/lc-lib-components

lewis & clark college library web components

Primary LanguageTypeScriptMIT LicenseMIT

lewis & clark web components

npm version

this is the repository for web components shared between watzek and boley libraries. the components are generated using stencil, a compiler that outputs cross-browser compatible custom elements. components are written using typescript and jsx, in a react-like style.

Getting Started

These instructions will let you develop and preview the components on your local machine. See "deployment" for instructions on making changes to the production library website.

Prerequisites

  • latest node LTS
  • a javascript package manager (give yarn a try!)
  • latest version of a modern browser - chrome works well

Installing

clone the repository:

$ git clone https://github.com/watzek/lc-lib-components

install dependencies:

$ cd lc-lib-components
$ yarn install # or npm install

Developing

run a development server (a browser window will open):

$ yarn dev # or npm run dev

all of the content in www is auto-generated to run the dev server. don't make changes to this folder - they will be overwritten.

you can edit component files located in src to change the components and the changes will appear automatically.

to play with different arrangements and test out the components, you can edit src/index.html. the dev server often won't pick up changes to src/index.html, so you'll need to restart it when you edit that file.

Deployment

to build a production bundle of the components:

$ yarn build # or npm run build

you can make the changes public by publishing to npm:

$ npm version minor # or one of (major|minor|patch)
$ npm publish

the library website references the npm package to load the components by using unpkg. you can update the code in springshare's cms to ensure that it's loading the latest version.

Built With

Contributing

(coming soon...)

Versioning

We use SemVer for versioning. For the versions available, see the releases page.

License

This project is licensed under the MIT License - see the LICENSE.md file for details