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
Requirement: NodeJS installed.
Install dependencies:
npm i
Upgrade dependencies to the latest available versions:
npm run upgrade
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 linting and basic tests with vitest
:
npm test
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 for production in the dist
folder:
npm run build
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.