ts-lit-docs
v0.1.4
Published
A documentation tool for LitElement components written in typescript
Downloads
5
Readme
Lit-docs
A website for visualizing documentation of lit-element web components written in typescript.
Run the project on its own components
npm start -- --config=./lit-docs.config.yaml
lit-docs.config.yaml
port: 5000
# directories to process for documentation
include:
- ./client/src
exclude:
- ./client/src/analytics
- ./client/src/util
# scripts that must be served in order to load components for examples
scripts:
- server/public/vendors-node_modules_material_mwc-button_mwc-button_js-node_modules_material_mwc-checkbox_mwc-6f2033.bundle.c9dd5f2e.js
- server/public/main.bundle.js
Running for a project
npm start -- --config=../<project>/lit-docs.yaml
Setup
Make sure you've installed the gcloud command line utility.
Makes sure you are using python 2 in the directory where you will be running
yarn dev
. The gcloud server requires Python 2.
Usage
We recommend using yarn; however these same commands will work with npm as well.
install dependencies
yarn
run a development server including watching your javascript and less files
yarn dev
deploy to app engine
First add the ID of your app engine cloud project to the "gcloud" > "id" section of package.json
.
Then:
yarn run deploy
Note: you can add additional gcloud parameters to the end. In the following command --quiet [-q] removes interactive prompts from gcloud
yarn run deploy -q
Extras
Linting
The .eslintrc
file mimics most of Google's Typescript style guide.
To run the linting rules:
yarn lint
Code Formatter
You can fix many of the linter prettier warnings with:
yarn lint --fix