Skip to content

Latest commit

 

History

History
87 lines (56 loc) · 1.59 KB

CONTRIBUTING.md

File metadata and controls

87 lines (56 loc) · 1.59 KB

🧑‍💻 Development setup

This page is for if you want to run the package and reusable components in development, and get involved by making a code contribution.

Clone the repository:

git clone https://github.com/sib-swiss/sparql-editor
cd sparql-editor

📥️ Install dependencies

Requirement: NodeJS installed.

Install dependencies:

npm i

Upgrade dependencies to the latest available versions:

npm run upgrade

🛠️ Run in development

Run the index.html page in development with auto reload when change to the code:

npm run dev

Run the demo pages locally:

npm run demo

🧪 Run tests

Run linting and basic tests with vitest:

npm test

🧹 Format and lint

Tip

This will be done automatically when you commit through a pre-commit hook.

Auto format code with prettier:

npm run fmt

Lint with eslint (we recommend to install the ESLint extension on VSCode):

npm run lint

📦️ Build

Build for production in the dist folder:

npm run build

🏷️ Release

To create a new release, you will need to login on your machine once with npm adduser if not already done.

Running the following script will upgrade version in package.json, generate changelog, create a tag, and publish the package to NPM:

npm version patch
# Or minor / major

You will need to go through NPM 2FA to publish.