diff --git a/README.md b/README.md index 7ddcdc6..b9e56bf 100644 --- a/README.md +++ b/README.md @@ -2,18 +2,19 @@ [![feature-management](https://img.shields.io/npm/v/@microsoft/feature-management?label=@microsoft/feature-management)](https://www.npmjs.com/package/@microsoft/feature-management) -Feature Management is a library for enabling/disabling features at runtime. -Developers can use feature flags in simple use cases like conditional statement to more advanced scenarios like conditionally adding routes. +Feature management provides a way to develop and expose application functionality based on features. Many applications have special requirements when a new feature is developed such as when the feature should be enabled and under what conditions. This library provides a way to define these relationships, and also integrates into common .NET code patterns to make exposing these features possible. ## Getting Started -### Prerequisites +[Azure App Configuration Quickstart](https://learn.microsoft.com/azure/azure-app-configuration/quickstart-feature-flag-javascript): A quickstart guide about how to integrate feature flags from Azure App Configuration into your JavaScript applications. -- Node.js LTS version +[Feature Overview](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-overview#feature-development-status): This document provides a feature status overview. + +[Feature Reference](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference): This document provides a full feature rundown. ### Usage -You can use feature flags from the Azure App Configuration service, local files or any other sources. +You can use feature flags from the Azure App Configuration service, local files or any other sources. For more information, please go to [Feature flag configuration](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference#feature-flag-configuration). #### Use feature flags from Azure App Configuration @@ -21,7 +22,9 @@ The App Configuration JavaScript provider provides feature flags in as a `Map` o A builtin `ConfigurationMapFeatureFlagProvider` helps to load feature flags in this case. ```js -const appConfig = await load(connectionString, {featureFlagOptions}); // load feature flags from Azure App Configuration service +import { load } from "@azure/app-configuration-provider"; +import { FeatureManager, ConfigurationMapFeatureFlagProvider } from "@microsoft/feature-management"; +const appConfig = await load("", {featureFlagOptions}); // load feature flags from Azure App Configuration service const featureProvider = new ConfigurationMapFeatureFlagProvider(appConfig); const featureManager = new FeatureManager(featureProvider); const isAlphaEnabled = await featureManager.isEnabled("Alpha"); @@ -54,6 +57,7 @@ Content of `sample.json`: Load feature flags from `sample.json` file. ```js +import { FeatureManager, ConfigurationObjectFeatureFlagProvider } from "@microsoft/feature-management"; const config = JSON.parse(await fs.readFile("path/to/sample.json")); const featureProvider = new ConfigurationObjectFeatureFlagProvider(config); const featureManager = new FeatureManager(featureProvider); @@ -61,6 +65,10 @@ const isAlphaEnabled = await featureManager.isEnabled("Alpha"); console.log("Feature Alpha is:", isAlphaEnabled); ``` +## Examples + +See code snippets under [examples/](./examples/) folder. + ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a diff --git a/src/feature-management-applicationinsights-browser/README.md b/src/feature-management-applicationinsights-browser/README.md index bf04bf0..e55f448 100644 --- a/src/feature-management-applicationinsights-browser/README.md +++ b/src/feature-management-applicationinsights-browser/README.md @@ -1,9 +1,11 @@ # Microsoft Feature Management Application Insights Plugin for Browser -Feature Management Application Insights Plugin for Browser provides a solution for sending feature flag evaluation events produced by the Feature Management library. +Feature Management Application Insights Plugin for Browser provides a solution for sending feature flag evaluation telemetry produced by the [`@microsoft/feature-management`](https://www.npmjs.com/package/@microsoft/feature-management) library. ## Getting Started +For more information, please go to [Feature reference](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference#application-insights-integration). + ### Usage ``` javascript diff --git a/src/feature-management-applicationinsights-node/README.md b/src/feature-management-applicationinsights-node/README.md index b08f98a..4dc36d8 100644 --- a/src/feature-management-applicationinsights-node/README.md +++ b/src/feature-management-applicationinsights-node/README.md @@ -1,13 +1,15 @@ # Microsoft Feature Management Application Insights Plugin for Node -Feature Management Application Insights Plugin for Node provides a solution for sending feature flag evaluation events produced by the Feature Management library. +Feature Management Application Insights Plugin for Node provides a solution for sending feature flag evaluation telemetry produced by the [`@microsoft/feature-management`](https://www.npmjs.com/package/@microsoft/feature-management) library. ## Getting Started +For more information, please go to [Feature reference](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference#application-insights-integration). + ### Prerequisites - Node.js LTS version -- `applicationinsights` SDK v2(classic) +- `applicationinsights` SDK 2.x (classic) ### Usage diff --git a/src/feature-management/README.md b/src/feature-management/README.md index 54aa97a..b9e56bf 100644 --- a/src/feature-management/README.md +++ b/src/feature-management/README.md @@ -2,18 +2,19 @@ [![feature-management](https://img.shields.io/npm/v/@microsoft/feature-management?label=@microsoft/feature-management)](https://www.npmjs.com/package/@microsoft/feature-management) -Feature Management is a library for enabling/disabling features at runtime. -Developers can use feature flags in simple use cases like conditional statement to more advanced scenarios like conditionally adding routes. +Feature management provides a way to develop and expose application functionality based on features. Many applications have special requirements when a new feature is developed such as when the feature should be enabled and under what conditions. This library provides a way to define these relationships, and also integrates into common .NET code patterns to make exposing these features possible. ## Getting Started -### Prerequisites +[Azure App Configuration Quickstart](https://learn.microsoft.com/azure/azure-app-configuration/quickstart-feature-flag-javascript): A quickstart guide about how to integrate feature flags from Azure App Configuration into your JavaScript applications. -- Node.js LTS version +[Feature Overview](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-overview#feature-development-status): This document provides a feature status overview. + +[Feature Reference](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference): This document provides a full feature rundown. ### Usage -You can use feature flags from the Azure App Configuration service, local files or any other sources. +You can use feature flags from the Azure App Configuration service, local files or any other sources. For more information, please go to [Feature flag configuration](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference#feature-flag-configuration). #### Use feature flags from Azure App Configuration @@ -21,7 +22,9 @@ The App Configuration JavaScript provider provides feature flags in as a `Map` o A builtin `ConfigurationMapFeatureFlagProvider` helps to load feature flags in this case. ```js -const appConfig = load(connectionString, {featureFlagOptions}); // load feature flags from Azure App Configuration service +import { load } from "@azure/app-configuration-provider"; +import { FeatureManager, ConfigurationMapFeatureFlagProvider } from "@microsoft/feature-management"; +const appConfig = await load("", {featureFlagOptions}); // load feature flags from Azure App Configuration service const featureProvider = new ConfigurationMapFeatureFlagProvider(appConfig); const featureManager = new FeatureManager(featureProvider); const isAlphaEnabled = await featureManager.isEnabled("Alpha"); @@ -42,7 +45,7 @@ Content of `sample.json`: { "id": "Alpha", "description": "", - "enabled": "true", + "enabled": true, "conditions": { "client_filters": [] } @@ -54,6 +57,7 @@ Content of `sample.json`: Load feature flags from `sample.json` file. ```js +import { FeatureManager, ConfigurationObjectFeatureFlagProvider } from "@microsoft/feature-management"; const config = JSON.parse(await fs.readFile("path/to/sample.json")); const featureProvider = new ConfigurationObjectFeatureFlagProvider(config); const featureManager = new FeatureManager(featureProvider); @@ -61,6 +65,10 @@ const isAlphaEnabled = await featureManager.isEnabled("Alpha"); console.log("Feature Alpha is:", isAlphaEnabled); ``` +## Examples + +See code snippets under [examples/](./examples/) folder. + ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a