From 5aa22f6b5fe02a3accb8acd71584ae4cdd0ce3f9 Mon Sep 17 00:00:00 2001 From: moklick Date: Tue, 23 Feb 2021 19:05:56 +0100 Subject: [PATCH] chore(readme): dev tasks --- README.md | 18 ++++++++++++------ package.json | 1 - 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fb13110a..4ad857e4 100644 --- a/README.md +++ b/README.md @@ -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 = () => ; ## 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 ``` diff --git a/package.json b/package.json index 8f81dc6c..42e1c7f9 100644 --- a/package.json +++ b/package.json @@ -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",