Skip to content

Commit 0f6331d

Browse files
committed
chore: runner structure
1 parent f69f989 commit 0f6331d

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,18 @@ Revert `generi log` last command
5858

5959
Monorepo versions may depend on external tools. Given this, Generi supports lerna workspaces, using the command `lerna version` before creating the changelog. In other setups, we recommend disabling the `tag` and `version` options.
6060

61-
### Code
61+
### Runner
6262

6363
Use generi in .js|.ts files programatically
6464

6565
```ts
66-
import * as generi from 'generi/code.js'
66+
import * as generi from 'generi/runner'
6767

68+
// ...
6869
generi.init().then(async () => {
6970
await generi.log('patch')
7071

71-
// code here
72+
// ...
7273
})
7374
```
7475

src/code/index.ts renamed to src/runner/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const log = (tag: GitNewTag, git: GitLogOptions = {}): Awaitable<void> =>
1616
});
1717
};
1818

19-
export const init = (tag: GitNewTag, git: GitLogOptions = {}): Awaitable<void> => {
19+
export const init = (): Awaitable<void> => {
2020
return new Promise(async (res, rej) => {
2121
try {
2222
await _init.setup();
@@ -28,7 +28,7 @@ export const init = (tag: GitNewTag, git: GitLogOptions = {}): Awaitable<void> =
2828
});
2929
};
3030

31-
export const revert = (tag: GitNewTag, git: GitLogOptions = {}): Awaitable<void> => {
31+
export const revert = (): Awaitable<void> => {
3232
return new Promise(async (res, rej) => {
3333
try {
3434
await _revert.setup();

tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { defineConfig } from 'tsup';
33
export default defineConfig({
44
entry: {
55
index: 'src/index.ts',
6-
code: 'src/code/index.ts',
6+
'runner/index': 'src/runner/index.ts',
77
},
88
target: ['node18'],
99
minify: true,

0 commit comments

Comments
 (0)