chore(readme): dev tasks

This commit is contained in:
moklick
2021-02-23 19:05:56 +01:00
parent c5a8f6ba05
commit 5aa22f6b5f
2 changed files with 12 additions and 7 deletions
+12 -6
View File
@@ -19,7 +19,7 @@ npm install react-flow-renderer
This is a very basic example of how to use React Flow. You can find more advanced examples on the [website](https://reactflow.dev/examples).
```javascript
```js
import React from 'react';
import ReactFlow from 'react-flow-renderer';
@@ -35,21 +35,27 @@ const BasicFlow = () => <ReactFlow elements={elements} />;
## Development
Before you start you need to install the React Flow dependencies via `npm install`.
Before you start you need to install the React Flow dependencies via `npm install` and the ones of the examples `cd example && npm install`.
If you want to contribute or develop custom features the easiest way is to start the dev server:
```
npm run dev
```sh
npm start
```
This serves the content of the `example` folder and watches changes inside the `src` folder. The examples are using the source of the `src` folder.
and the example app via:
```sh
cd example && npm start
```
The example app serves the content of the `example` folder and watches changes inside the `src` folder. The examples are using the source of the `src` folder.
## Testing
Testing is done with cypress. You can find the tests in the [`integration/flow`](/cypress/integration/flow) folder. In order to run the tests do:
```
```sh
npm run test
```
-1
View File
@@ -14,7 +14,6 @@
"start": "rollup -w -c",
"start:examples": "cd example && npm start",
"build:examples": "cd example && npm run build",
"dev": "npm run build && npm run start && npm run start:examples",
"start:testserver": "npm run build && npm run start:examples",
"build:dev": "npm install && cd example && npm install && npm run build",
"dev:wait": "start-server-and-test start:testserver http-get://localhost:3000",