Skip to content

Commit

Permalink
Update getting_started.md
Browse files Browse the repository at this point in the history
- change to sprotty 1.0
- move npm i before running tsc
- rename view.tsx to views.tsx to fit di.config.ts
  • Loading branch information
glatuske authored and spoenemann committed Dec 20, 2023
1 parent bf4fbb5 commit ec5bbd9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions hugo/content/docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Our 'Getting Started' example consists of a simple application that displays a l
The main steps to integrate Sprotty into our application are as follows:

1. [Set-up](#setting-up-our-application) your application.
2. [Define your model](#define-your-model) by creating subclasses of `SModelElementImpl`.
2. [Define your model](#define-your-model) by creating sub-interfaces of `SModelElement`.
3. [Implement views](#implement-views) to generate SVGs for each type of model element.
4. [Configure the diagram](#configure-the-diagram) through dependency injection.
5. [Connect to a model source](#connect-to-a-model-source), either local or remote
Expand Down Expand Up @@ -48,12 +48,12 @@ Our example application is based on TypeScript. In this application we will set
},
"dependencies": {
"reflect-metadata": "^0.1.13",
"sprotty": "^0.13.0"
"sprotty": "^1.0.0"
}
}
```

4. Initialize the TypeScript project
4. Install dependencies running `npm i`
5. Initialize the TypeScript project

```shell
npx tsc --init
Expand Down Expand Up @@ -81,8 +81,6 @@ Our example application is based on TypeScript. In this application we will set
]
}
```

5. Install dependencies running `npm i`
6. Create a `index.html` file at the root of your project

```html
Expand Down Expand Up @@ -131,7 +129,7 @@ export interface TaskNode extends SNode {
A view maps a model element to its graphical representation. You can create your own views by creating a class implementing `IView` or extending a view already available in Sprotty.
In the following example we use the JSX syntax to create a SVG group with a `rect` and a `text` element. Add a new file `view.tsx` (note the `tsx` extension) at the root of the project:
In the following example we use the JSX syntax to create a SVG group with a `rect` and a `text` element. Add a new file `views.tsx` (note the `tsx` extension) at the root of the project:
```typescript
/** @jsx svg */
Expand Down

0 comments on commit ec5bbd9

Please sign in to comment.