Skip to content

Commit 503a38e

Browse files
committed
docs: fix examples
1 parent 841f2a1 commit 503a38e

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

packages/npm/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ npm i @simple-release/npm
4848
import { Releaser } from '@simple-release/core'
4949
import { NpmProject } from '@simple-release/npm'
5050

51-
const project = new NpmProject()
52-
53-
await new Releaser(project)
51+
await new Releaser({
52+
project: new NpmProject()
53+
})
5454
.bump()
5555
.commit()
5656
.tag()
@@ -65,11 +65,11 @@ Workspaces example:
6565
import { Releaser } from '@simple-release/core'
6666
import { NpmWorkspacesProject } from '@simple-release/npm'
6767

68-
const project = new NpmWorkspacesProject({
69-
mode: 'independent'
68+
await new Releaser({
69+
project: new NpmWorkspacesProject({
70+
mode: 'independent'
71+
})
7072
})
71-
72-
await new Releaser(project)
7373
.bump()
7474
.commit()
7575
.tag()
@@ -130,9 +130,9 @@ Function to compose the main manifest with secondaries. It can be needed if you
130130

131131
```js
132132
import { ComposedProjectManifest } from '@simple-release/core'
133-
import { NpmProject } from '@simple-release/npm'
133+
import { NpmWorkspacesProject } from '@simple-release/npm'
134134

135-
new NpmProject({
135+
new NpmWorkspacesProject({
136136
compose: (main, isRoot) => (
137137
isRoot
138138
? main

packages/pnpm/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ npm i @simple-release/pnpm
4848
import { Releaser } from '@simple-release/core'
4949
import { PnpmProject } from '@simple-release/pnpm'
5050

51-
const project = new PnpmProject()
52-
53-
await new Releaser(project)
51+
await new Releaser({
52+
project: new PnpmProject()
53+
})
5454
.bump()
5555
.commit()
5656
.tag()
@@ -65,11 +65,11 @@ Workspaces example:
6565
import { Releaser } from '@simple-release/core'
6666
import { PnpmWorkspacesProject } from '@simple-release/pnpm'
6767

68-
const project = new PnpmWorkspacesProject({
69-
mode: 'independent'
68+
await new Releaser({
69+
project: new PnpmWorkspacesProject({
70+
mode: 'independent'
71+
})
7072
})
71-
72-
await new Releaser(project)
7373
.bump()
7474
.commit()
7575
.tag()
@@ -130,9 +130,9 @@ Function to compose the main manifest with secondaries. It can be needed if you
130130

131131
```js
132132
import { ComposedProjectManifest } from '@simple-release/core'
133-
import { PnpmProject } from '@simple-release/pnpm'
133+
import { PnpmWorkspacesProject } from '@simple-release/pnpm'
134134

135-
new PnpmProject({
135+
new PnpmWorkspacesProject({
136136
compose: (main, isRoot) => (
137137
isRoot
138138
? main

0 commit comments

Comments
 (0)