PolymerLabs/indie-catalog

Name: indie-catalog

Owner: PolymerLabs

Description: A simple catalog for demoing web components

Created: 2017-06-16 19:45:27.0

Updated: 2018-03-27 15:44:20.0

Pushed: 2018-02-03 16:00:56.0

Homepage: http://polymerlabs.github.io/indie-catalog

Size: 5493

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

indie-catalog

This repo contains a web components catalog that you can host yourself. It's intended for companies that have private elements and would like to host them, but those elements can't be published to something like webcomponents.org.

Step 0. Clone this repo.
clone https://github.com/PolymerLabs/indie-catalog.git
ndie-catalog
Step 1. Configuration

The elements that you want to appear in the catalog are listed in catalog.json:


ackages": {
"an-element": { ... }
"another-element": { ... }


There's different setups you might be interested in:

Elements with an accessible git repo

If you want to access the code from a git repo, use the git field:


ackages": {
"paper-input": {
   "git": "https://github.com/polymerelements/paper-input",
   "description": "A Material Design input"
}


This assumes that your demo will be accessible in a demo subfolder of the git repo (i.e. paper-input/demo/index.html).

Elements with externally hosted the demo and docs

If the demo and docs are already hosted in a different place, you can use the docs and demo fields to link directly to them:


ackages": {
"paper-checkbox": {
  "description": "A Material Design checkbox with remote docs and demo",
  "demo": "https://raw-dot-custom-elements.appspot.com/PolymerElements/paper-checkbox/v2.0.0/paper-checkbox/demo/index.html",
  "docs": "https://www.webcomponents.org/element/PolymerElements/paper-checkbox"
}


You can also use these properties this if your element has a demo not in a /demo subdirectory, but in some different directory, by using relative paths. This relative path should look like dist/{element-name}/bower_components/{element-name}/...

y-image": {
it": "https://github.com/notwaldorf/lazy-image",
escription": "A custom image element that lets you load resources on demand",
emo": "dist/lazy-image/bower_components/lazy-image/index.html"    

Assumptions

For either usage, the following extra assumptions are made:

Step 2. Do the build dance.

This should take a while:

install
run build

If you're curious, this will be doing the following steps, for each package in catalog.json with a git repo provided:

Step 3. Run it locally
on -m SimpleHTTPServer # or your favourite local server

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.