|
| 1 | +# CONTRIBUTING |
| 2 | + |
| 3 | +All contributions, such as [issues](https://github.com/neo4j/cypher-builder/issues) and [pull requests](https://github.com/neo4j/cypher-builder/pulls) are welcome. |
| 4 | + |
| 5 | +If you want to contribute code, make sure to [sign the CLA](https://neo4j.com/developer/contributing-code/#sign-cla). |
| 6 | + |
| 7 | +## Development instructions |
| 8 | + |
| 9 | +- `npm test` to run cypher builder tests. Most tests are located next to the code that are testing as a `.test.ts` file |
| 10 | +- `npm run build` to compile cypher builder library |
| 11 | +- `npm run docs` to generate the API reference docs |
| 12 | +- `npm run changeset` to generate changelog files of the changes |
| 13 | + |
| 14 | +### Link Cypher Builder locally with yarn |
| 15 | + |
| 16 | +In the Cypher Builder folder run: |
| 17 | + |
| 18 | +- `yarn link` |
| 19 | +- `yarn build` |
| 20 | + |
| 21 | +In the root of the package run: |
| 22 | + |
| 23 | +- `yarn link -p [path-to-local-cypher-builder]` |
| 24 | + |
| 25 | +To unlink, in the project using cypher-builder: |
| 26 | + |
| 27 | +- `yarn unlink @neo4j/cypher-builder` |
| 28 | + |
| 29 | +### TSDoc references |
| 30 | + |
| 31 | +Each public element of the library should have a TSDoc comment compatible with [TypeDoc](https://typedoc.org/guides/overview). |
| 32 | +The comments should follow these conventions: |
| 33 | + |
| 34 | +- Brief description if needed |
| 35 | +- @group - This should be the Cypher concept related to this interface: Functions, Clauses, Operators, Procedures, Subqueries, Patterns, Namespaces, Maps, Lists, Utils. |
| 36 | +- @category - Sub grouping, if needed. For example, `Aggregations` inside the group `functions`, |
| 37 | +- @see {@link https://neo4j.com/docs/cypher-manual | Cypher Documentation} - A link to the element in the Cypher documentation, |
| 38 | +- @internal - If used by the library and not exposed, |
| 39 | +- @example - Example of usage and resulting Cypher, in markdown, |
| 40 | +- @since - If recently added to Neo4j: `@since Neo4j 5.19`, |
| 41 | +- @deprecated - If deprecated in Cypher Builder, |
| 42 | + |
| 43 | +For example: |
| 44 | + |
| 45 | +```ts |
| 46 | +/** Absolute value of an Integer or Float |
| 47 | + * @group Functions |
| 48 | + * @category Math |
| 49 | + * @see {@link https://neo4j.com/docs/cypher-manual/current/functions/mathematical-numeric/#functions-abs | Cypher Documentation} |
| 50 | + */ |
| 51 | +export function abs(expr: Expr): CypherFunction {} |
| 52 | +``` |
| 53 | + |
| 54 | +#### Files |
| 55 | + |
| 56 | +- `tsdoc.json` Defines the tsdoc shcema |
| 57 | +- `typedoc.json` Configures the tool typedoc |
0 commit comments