https://github.com/neo4j/cypher-editor
Codemirror editor for Cypher, with syntax awareness and auto-completion
https://github.com/neo4j/cypher-editor
codemirror cypher cypher-query-language
Last synced: about 2 months ago
JSON representation
Codemirror editor for Cypher, with syntax awareness and auto-completion
- Host: GitHub
- URL: https://github.com/neo4j/cypher-editor
- Owner: neo4j
- License: apache-2.0
- Created: 2017-04-24T16:05:45.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2024-04-02T12:27:25.000Z (about 1 year ago)
- Last Synced: 2025-04-10T03:57:28.174Z (about 2 months ago)
- Topics: codemirror, cypher, cypher-query-language
- Language: JavaScript
- Homepage:
- Size: 11.7 MB
- Stars: 46
- Watchers: 29
- Forks: 26
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### cypher-editor
### How to use
Go to the relevant docs in the [docs/generated](./docs/generated) folder to read the docs on the package you're about to use.
Shortcuts:
[React](https://github.com/neo4j/cypher-editor/blob/main/docs/generated/neo4j-cypher_react-codemirror.md)```bash
npm install @neo4j-cypher/react-codemirror
```[Svelte](https://github.com/neo4j/cypher-editor/blob/main/docs/generated/neo4j-cypher_svelte-codemirror.md)
```bash
npm install @neo4j-cypher/svelte-codemirror
```### Styling the view components
To make the view components build tool agnostic, the CSS is separate since importing CSS isn't a thing in many tools.
If your build tool supports importing CSS, you can import like this:```js
import "@neo4j-cypher/codemirror/css/cypher-codemirror.css";
```If not, you can load the styles from a CDN in your HTML like:
```html
```
### Cloning
This repository is a monorepo, and all packages are located in the `packages` directory.
To install the dependencies for the monorepo, run the following the base directory:
```
npm install
```Optionally to build all library packages for release preparation, run the following in the base directory:
```
npm run build:libs
```### Demos
Once you have install the dependencies, you can run any of the demos that are in `demo-` prefixed packages, using commands like the following:
```
cd packages/demo-codemirror-6-vite-svelte
npm run start
```### Tests
Some e2e tests are setup. You can run them indivudually in each package:
```bash
cd packages/# for dev
npm run start
npm run e2e# for prod
npm run build
npm run serve
npm run e2e
npm run unserve
```Or all packages together:
```bash
# in project root# for prod
npm run start:e2e
npm run stop:e2e
```# Contribution process
Contributions are very much appreciated and here's an outline of the process.
- Work in your own fork of the repo
- Open a PR against the main branch
- Follow the instructions in the pull request template (run `npx changeset`)