ez-timeline
v0.2.3
Published
Generate timelines, genealogies and maps
Downloads
4
Maintainers
Readme
Ez Timeline
Genrate timelines with web components.
Tech Stack
Client: TypeScript, Lit
Setup
Install dependencies:
npm iBuild
This project uses the TypeScript compiler, then use rollup to create a bundle.
To build the JavaScript:
npm run buildTo watch files and rebuild when the files are modified, run the following command in a separate shell:
npm run build:watchTesting
To do
Dev Server
To run the dev server and open the project in a new browser tab:
npm run serveThere 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 lintFormatting
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.
