Skip to content

Commit c1fa7ee

Browse files
committed
docs fix
1 parent 05a5afb commit c1fa7ee

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

docs/about-the-project/architecture-questions.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ Joint JS \(a fantastic library\) + my need for rich HTML nodes + LabView + Blend
88

99
## Why render the nodes as HTML Elements and not SVG's?
1010

11-
My original requirement for this library stemmed from the requirement of wanting HTML nodes that would allow me to embed rich controls such as input fields, drop downs and have the system treat such nodes as first class citizens. I originally tried to make this work in JointJS, but ran into a number of problems of which this was a relatively big one.
11+
My original requirement for this library stemmed from the requirement of wanting HTML nodes that would allow me to embed rich controls such as input fields, dropdowns and have the system treat such nodes as first class citizens. I originally tried to make this work in JointJS, but ran into a number of problems of which this was a relatively big one.
1212

1313
JointJS does allow you to do this, but at the time of writing this library originally, I was having a lot of trouble to make it work exactly like I needed it, and therefore decided from the very beginning that I would attempt this with an HTML first mindset.
1414

1515
## Why Typescript?
1616

1717
Firstly, because it can transpile into any level of ECMAScript. This means that I don't need to break our the refactor tractor every time ECMAScript decides it wants to add features which it should have done years ago.
1818

19-
I also ported it to Typescript to accommodate the heavy architectural changes I was starting to make. Since porting the library to typescript, and seeing the project explode in size and complexity, I consider this the best decision made with regards to this library so far.
19+
I also ported it to Typescript to accommodate the heavy architectural changes I was starting to make. Since porting the library to typescript, and seeing the project explode in size and complexity, I consider this the best decision made with regard to this library so far.
2020

2121
Porting to typescript also afforded us a set of powerful features such as generics and static analysis that all the project contributors have made exclusive use of.
2222

2323
Typescript is <3 typescript is life.
2424

2525
## Why not Flow instead of Typescript?
2626

27-
At the time when I first started evaluating languages that could transpile to ECMAScript, I was not so sold on the supporting environment surrounding flow, and and found that there was better tooling to support typescript, they are ultimately trying to do the same thing though, and I guess in the end, typescript just made more sense.
27+
At the time when I first started evaluating languages that could transpile to ECMAScript, I was not so sold on the supporting environment surrounding flow, and found that there was better tooling to support typescript, they are ultimately trying to do the same thing though, and I guess in the end, typescript just made more sense.
2828

2929
## Why React ?
3030

31-
React is really efficient at rendering and managing HTML in a declarative manner. React has also become one of the bigger industry standards and has a rich eco system that plays really well with typescript. Apart from these notable points, I am really fond of React and wanted a diagramming library that takes full advantage of it, and makes it easy for engineers to use its power as well, when extending this library.
31+
React is really efficient at rendering and managing HTML in a declarative manner. React has also become one of the bigger industry standards and has a rich ecosystem that plays really well with typescript. Apart from these notable points, I am really fond of React and wanted a diagramming library that takes full advantage of it, and makes it easy for engineers to use its power as well, when extending this library.
3232

3333
## Why cant the Default models and widgets do this or that ?
3434

docs/about-the-project/testing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## End to end testing
44

5-
To test the functionality of the library, we make use of e2e tests \(end to end tests\). In this library, we spin up a headless chrome using pupeteer and interactively and programmatically tell the mouse pointer to click and drag on various elements while making assertions along the way.
5+
To test the functionality of the library, we make use of e2e tests \(end to end tests\). In this library, we spin up a headless chrome using puppeteer and interactively and programmatically tell the mouse pointer to click and drag on various elements while making assertions along the way.
66

77
We use Jest for the assertions and the interactivity is handled by puppeteer. Due to the laborious nature of writing e2e tests, there is a helper method that is provided in each test that makes interacting with the diagrams a lot easier. Using this helper, you can easily tell the mouse to drag links between nodes, select them and also easily assert information about them. The important thing here, is that this helper does not touch the model in any way, but is purely a helper for writing the tests themselves. Please make use of this helper when writing tests, as it ensure that the tests are defensive in nature, and also reduces the overhead of physically writing them.
88

docs/getting-started/README.md

+4-19
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Get the package
44

5-
The first thing you need to do, is grab the distribution files on NPM. You can do this either using **yarn** or **npm.**
5+
The first thing you need to do, is grab the distribution files on NPM.
66

77
**Via yarn:**
88

@@ -16,25 +16,10 @@ yarn add @projectstorm/react-diagrams
1616
npm install @projectstorm/react-diagrams
1717
```
1818

19-
When you run this in your project directory, this will install the library into `./node_modules/@projectstorm/react-diagrams`. You will then find a **dist** folder that contains all the minified and production ready code.
20-
21-
## Install the peer dependencies
22-
23-
The library includes it's dependencies as peer-dependencies, so yarn will output warnings letting you know which ones are missing. Simple install them, specifically these ones:
24-
25-
**Via yarn:**
26-
27-
```text
28-
yarn add closest lodash react dagre pathfinding paths-js @emotion/react @emotion/styled resize-observer-polyfill
29-
```
30-
31-
**Via npm:**
19+
**Via pnpm:**
3220

3321
```text
34-
npm install closest lodash react dagre pathfinding paths-js @emotion/react @emotion/styled resize-observer-polyfill
22+
pnpm add @projectstorm/react-diagrams
3523
```
3624

37-
We do this, so that you can better control the versions of these libraries yourself since you might make use of `Lodash` in other parts of your software.
38-
39-
40-
25+
When you run this in your project directory, this will install the library into `./node_modules/@projectstorm/react-diagrams`. You will then find a **dist** folder that contains all the minified and production ready code.

0 commit comments

Comments
 (0)