Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tajakobsen committed Jul 2, 2022
1 parent d0ec8d9 commit 7e55ec3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@ you are using the [webpack-starter](https://github.com/enonic/starter-webpack))
```json
{
"compilerOptions": {
"types": ["node", "enonic-types"]
}
"types": ["node", "enonic-types"],
"rootDirs": [
"./src/main/resources",
"./.xp-codegen"
],
},
"include": [
"./.xp-codegen/**/*",
"./src/main/resources/**/*"
],
"exclude": ["./build/*"]
}

```

And you're ready to start coding!
Expand All @@ -38,7 +46,7 @@ We recommend using this library together with the [xp-codegen-plugin](https://gi
We have an Enonic service that returns an article by id.

```typescript
import { Article } from "../../site/content-types/article/article"; // 1
import { Article } from "../../site/content-types"; // 1
import * as contentLib from "/lib/xp/content"; // 2

export function get(req: XP.Request): XP.Response { // 3
Expand Down

0 comments on commit 7e55ec3

Please sign in to comment.