component-simple-slider

A very naive slider component using Custom Element and Shadow DOM based components to serve as a proof of concept for publishing and consuming Custom Elements from npm.
Installation
- If you aren't already using it, use npm or Yarn to install
@polymer/lit-element
to your project's dependencies
- Install
@???/component-simple-slider
This component makes no assumptions about polyfills, please provide your own.
Usage
Two things are needed when using this componenet
- Number of slides
slides="3"
- Each Slide, with an attribute of
slots="slideN"
(N
should increment starting from 1)
example:
<x-simple-slider slots="3">
<div slot="slide1">Slide 1</div>
<div slot="slide2">Slide 3</div>
<div slot="slide3">Slide 3</div>
</x-simple-slider>
Development
This project uses Yarn, please install it first
- For a dev server running a "reference app", run
yarn develop
- To run unit tests, run
yarn test
Publishing
Follow these steps for authenticating with npm.
Here are the basic steps to follow for publishing a new release
- Make sure all commits are in
master
- Make sure there are no changes in your working directory by running
git status
- Set the version by running
npm version <major|minor|patch>
- Pubish to npm by running
npm publish
- Tag and push up all changes with `git tag -a x.y.z -m "tagging x.y.z release"
- Create release notes in GitHub
- Verify the release in the npm registry