diff --git a/docs/plugins/index.md b/docs/plugins/index.md index f8808dc..525f58a 100644 --- a/docs/plugins/index.md +++ b/docs/plugins/index.md @@ -12,9 +12,20 @@ Productled offers a variety of plugin libraries to extend its capabilities. You npm install @productled/ ``` -Register the plugin with Productled Core at application start. +e.g., + +```bash +npm install @productled/spotlights +``` + +Register the plugin with Productled Core at application start. e.g., in file: index.tsx + +``` typescript +productled.registerPlugin(new ()); +``` + +e.g., -e.g., in file: index.tsx ``` typescript productled.registerPlugin(new SpotlightPlugin()); ``` diff --git a/packages/@productled/spotlights/src/SpotlightPlugin.ts b/packages/@productled/spotlights/src/SpotlightsPlugin.ts similarity index 90% rename from packages/@productled/spotlights/src/SpotlightPlugin.ts rename to packages/@productled/spotlights/src/SpotlightsPlugin.ts index b7fce40..7bae41c 100644 --- a/packages/@productled/spotlights/src/SpotlightPlugin.ts +++ b/packages/@productled/spotlights/src/SpotlightsPlugin.ts @@ -1,7 +1,7 @@ import { type Plugin } from "@productled/core"; import { Spotlight } from "./Spotlight"; -class SpotlightPlugin implements Plugin { +class SpotlightsPlugin implements Plugin { private key: string = "spotlights"; get Name(): string { @@ -22,4 +22,4 @@ class SpotlightPlugin implements Plugin { } } -export default SpotlightPlugin; \ No newline at end of file +export default SpotlightsPlugin; \ No newline at end of file diff --git a/packages/@productled/spotlights/src/index.ts b/packages/@productled/spotlights/src/index.ts index 61c8d23..65f084f 100644 --- a/packages/@productled/spotlights/src/index.ts +++ b/packages/@productled/spotlights/src/index.ts @@ -1,2 +1,2 @@ -import SpotlightPlugin from './SpotlightPlugin'; -export {SpotlightPlugin}; \ No newline at end of file +import SpotlightsPlugin from './SpotlightsPlugin'; +export {SpotlightsPlugin}; \ No newline at end of file diff --git a/packages/samples/react-sample/src/index.tsx b/packages/samples/react-sample/src/index.tsx index 54f198b..a6ea5d7 100644 --- a/packages/samples/react-sample/src/index.tsx +++ b/packages/samples/react-sample/src/index.tsx @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; -import { SpotlightPlugin } from '@productled/spotlights'; +import { SpotlightsPlugin } from '@productled/spotlights'; import productledConf from './productled-config.json'; import { Productled } from '@productled/core'; @@ -16,7 +16,7 @@ const productled = Productled.getInstance(); // load the configuration productled.loadConfig(productledConf); // register the plugins -productled.registerPlugin(new SpotlightPlugin()); +productled.registerPlugin(new SpotlightsPlugin()); root.render(