Skip to content

Commit 80f8a2d

Browse files
committed
doc: Prepared reamde.md delete clutter
1 parent 1cae783 commit 80f8a2d

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,26 @@ import {start} from '@shelf/postgres-local';
1717

1818
await start({
1919
seedPath: "schema.sql",
20-
version: 14
20+
version: 14,
21+
port: 5555,
22+
includeInstallation: true
2123
});
2224
```
25+
- `seedPath` - absolute path to sql file with commands that will set up db structure before tests
26+
- `includeInstallation`
27+
- when this flag is `true` (default) macOS will run `brew install` and linux `apt install` to make sure `postgres` is installed
28+
- when false - package omit installing postgres and relly that it is already in place
2329

2430
### 2. Stop Postgres
2531

2632
```js
2733
import {stop} from '@shelf/postgres-local';
2834

29-
await stop(14);
35+
await stop({version: 14});
3036
```
3137

38+
39+
3240
## Publish
3341

3442
```sh

jest-postgres-config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ import cwd from 'cwd';
33
module.exports = {
44
seedPath: `${cwd()}/test/seed.sql`,
55
version: 14,
6+
port: 5555,
7+
includeInstallation: true,
68
};

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export async function start(options: {
4444
}
4545
}
4646

47-
export function stop({version = 14}: {version?: number; useSudo?: boolean}): any {
48-
return spawnSync(getStopScript({version}), {
47+
export function stop({version = 14}: {version?: number}): void {
48+
spawnSync(getStopScript({version}), {
4949
stdio: 'inherit',
5050
shell: true,
5151
});

0 commit comments

Comments
 (0)