ez-timeline
v0.2.3
Published
Generate timelines, genealogies and maps
Downloads
10
Maintainers
Readme
Ez Timeline
Genrate timelines with web components.
Tech Stack
Client: TypeScript, Lit
Setup
Install dependencies:
npm i
Build
This project uses the TypeScript compiler, then use rollup to create a bundle.
To build the JavaScript:
npm run build
To watch files and rebuild when the files are modified, run the following command in a separate shell:
npm run build:watch
Testing
To do
Dev Server
To run the dev server and open the project in a new browser tab:
npm run serve
There is a development HTML file located at /dev/index.html
that you can view at http://localhost:8000/dev/index.html. Note that this command will serve your code using Lit's development mode (with more verbose errors). To serve your code against Lit's production mode, use npm run serve:prod
.
Linting
Linting of TypeScript files is provided by ESLint and TypeScript ESLint. In addition, lit-analyzer is used to type-check and lint lit-html templates with the same engine and rules as lit-plugin.
The rules are mostly the recommended rules from each project, but some have been turned off to make LitElement usage easier. The recommended rules are pretty strict, so you may want to relax them by editing .eslintrc.json
and tsconfig.json
.
To lint the project run:
npm run lint
Formatting
Prettier is used for code formatting. It has been pre-configured according to the Lit's style. You can change this in .prettierrc.json
.
Prettier has not been configured to run when committing files, but this can be added with Husky and and pretty-quick
. See the prettier.io site for instructions.