Skip to content

Latest commit

 

History

History
96 lines (58 loc) · 2.78 KB

CONTRIBUTING.md

File metadata and controls

96 lines (58 loc) · 2.78 KB

Run tests and update docs

This document contains details on the workflow used to develop the component if you want to improve it, and contribute.

📥️ Install for development

Clone the repository:

git clone https://github.com/vemonet/nanopub-display
cd nanopub-display

Install dependencies:

yarn

If you use VS Code, we highly recommend the lit-plugin extension, which enables some extremely useful features for lit-html templates.

🧑‍💻 Development

Start the component in development mode, it will automatically reload when the code is changed:

yarn dev

📦️ Build

To build the JavaScript version of your component:

yarn build

This sample uses the TypeScript compiler and rollup to produce JavaScript that runs in modern browsers.

☑️ Testing

Tests can be run with the test script:

yarn test

Alternatively the test:prod command will run your tests in Lit's production mode.

This project uses modern-web.dev's @web/test-runner for testing. See the modern-web.dev testing documentation for more information.

✒️ Formatting

Prettier is used for code formatting:

yarn fmt

You can change the configuration in the package.json. Prettier has not been configured to run when committing files, but this can be added with Husky and pretty-quick. See the prettier.io site for instructions.

✅ Linting

To check if the project does not break any linting rule run:

yarn lint

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.

📖 Documentation website

To build and run the documentation website, run:

yarn docs

To build the website for deployment, run:

yarn docs:build

ℹ️ More information

🔨 Built with Lit and N3.js

Vite TS starter: https://github.com/vitejs/vite/tree/main/packages/create-vite/template-lit-ts

Official lit TS starter: https://github.com/lit/lit-element-starter-ts

RDFJS components: https://github.com/zazuko/rdfjs-elements

Lit element React integration: https://github.com/lit/lit/tree/main/packages/labs/react