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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
clone https://github.com/PolymerLabs/indie-catalog.git
ndie-catalog
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:
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
).
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"
For either usage, the following extra assumptions are made:
bower install
in that repo completes successfullybower_components
anywhere. See
PolymerElements/paper-button for an example.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:
git clone
it to /dist
.git
and .gitignore
dirs from the clonebower install
in /dist/${elementName}/bower_components
/dist/${elementName}/bower_components/${elementName}
,
so that the demo works.on -m SimpleHTTPServer # or your favourite local server