Skip to content

Commit 9b3eafd

Browse files
committed
Apply changesets and update CHANGELOG [skip ci]
1 parent ac74065 commit 9b3eafd

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

lib/README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Git Json Resolver <img src="https://raw.githubusercontent.com/mayank1513/mayank1513/main/popper.png" style="height: 40px"/>
22

3+
![Git JSON Resolver Banner](./banner.jpg)
4+
35
[![test](https://github.com/react18-tools/git-json-resolver/actions/workflows/test.yml/badge.svg)](https://github.com/react18-tools/git-json-resolver/actions/workflows/test.yml)
46
[![Maintainability](https://qlty.sh/gh/react18-tools/projects/git-json-resolver/maintainability.svg)](https://qlty.sh/gh/react18-tools/projects/git-json-resolver)
57
[![codecov](https://codecov.io/gh/react18-tools/git-json-resolver/graph/badge.svg)](https://codecov.io/gh/react18-tools/git-json-resolver)
@@ -349,7 +351,7 @@ export const strategies = {
349351
"timestamp-latest": timestampLatest,
350352
};
351353

352-
// Plugin interface for dynamic loading
354+
// Plugin interface for dynamic loading (object-based)
353355
const plugin: StrategyPlugin = {
354356
strategies,
355357
init: async config => {
@@ -358,6 +360,19 @@ const plugin: StrategyPlugin = {
358360
};
359361

360362
export default plugin;
363+
364+
// Alternative: Function-based plugin (NEW)
365+
export default async function createPlugin(config?: any): Promise<StrategyPlugin> {
366+
// Initialize with config if needed
367+
console.log("Plugin initialized with:", config);
368+
369+
return {
370+
strategies,
371+
init: async initConfig => {
372+
// Additional initialization if needed
373+
},
374+
};
375+
}
361376
```
362377

363378
### Custom Strategies (Inline)

0 commit comments

Comments
 (0)