mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-19 00:15:43 +01:00
chore: adjust language names (#8117)
This commit is contained in:
parent
e8fee92838
commit
0fa3738412
@ -1,12 +1,12 @@
|
|||||||
import type { SdkName } from './sharedTypes';
|
import type { SdkName } from './sharedTypes';
|
||||||
|
|
||||||
export const installCommands: Record<SdkName, string> = {
|
export const installCommands: Record<SdkName, string> = {
|
||||||
Node: ' npm install unleash-client',
|
'Node.js': ' npm install unleash-client',
|
||||||
Golang: 'go get github.com/Unleash/unleash-client-go/v3',
|
Go: 'go get github.com/Unleash/unleash-client-go/v3',
|
||||||
Ruby: 'gem install unleash',
|
Ruby: 'gem install unleash',
|
||||||
PHP: 'composer require unleash/client',
|
PHP: 'composer require unleash/client',
|
||||||
Rust: 'cargo add unleash-client',
|
Rust: 'cargo add unleash-client',
|
||||||
DotNet: `dotnet add package unleash.client
|
'.NET': `dotnet add package unleash.client
|
||||||
// If you do not have a json library in your project:
|
// If you do not have a json library in your project:
|
||||||
dotnet add package Newtonsoft.Json`,
|
dotnet add package Newtonsoft.Json`,
|
||||||
Java: `<dependency>
|
Java: `<dependency>
|
||||||
@ -15,7 +15,7 @@ dotnet add package Newtonsoft.Json`,
|
|||||||
<version>Latest version here</version>
|
<version>Latest version here</version>
|
||||||
</dependency>`,
|
</dependency>`,
|
||||||
Python: 'pip install UnleashClient',
|
Python: 'pip install UnleashClient',
|
||||||
Javascript: 'npm install unleash-proxy-client',
|
JavaScript: 'npm install unleash-proxy-client',
|
||||||
React: 'npm install @unleash/proxy-client-react unleash-proxy-client',
|
React: 'npm install @unleash/proxy-client-react unleash-proxy-client',
|
||||||
Vue: 'npm install @unleash/proxy-client-vue',
|
Vue: 'npm install @unleash/proxy-client-vue',
|
||||||
Svelte: 'npm install @unleash/proxy-client-svelte',
|
Svelte: 'npm install @unleash/proxy-client-svelte',
|
||||||
@ -29,7 +29,7 @@ dotnet add package Newtonsoft.Json`,
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const initializeCodeSnippets: Record<SdkName, string> = {
|
export const initializeCodeSnippets: Record<SdkName, string> = {
|
||||||
Node: `const { initialize } = require('unleash-client');
|
'Node.js': `const { initialize } = require('unleash-client');
|
||||||
|
|
||||||
const unleash = initialize({
|
const unleash = initialize({
|
||||||
url: '<YOUR_API_URL>',
|
url: '<YOUR_API_URL>',
|
||||||
@ -38,7 +38,7 @@ const unleash = initialize({
|
|||||||
metricsInterval: 5000,
|
metricsInterval: 5000,
|
||||||
});
|
});
|
||||||
`,
|
`,
|
||||||
Golang: `import (
|
Go: `import (
|
||||||
"github.com/Unleash/unleash-client-go/v3"
|
"github.com/Unleash/unleash-client-go/v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ $unleash = UnleashBuilder::create()
|
|||||||
"<YOUR_API_TOKEN>",
|
"<YOUR_API_TOKEN>",
|
||||||
)?;
|
)?;
|
||||||
client.register().await?;`,
|
client.register().await?;`,
|
||||||
DotNet: `using Unleash;
|
'.NET': `using Unleash;
|
||||||
var settings = new UnleashSettings()
|
var settings = new UnleashSettings()
|
||||||
{
|
{
|
||||||
AppName = "unleash-onboarding-dotnet",
|
AppName = "unleash-onboarding-dotnet",
|
||||||
@ -100,7 +100,7 @@ client = UnleashClient(
|
|||||||
custom_headers={'Authorization': '<YOUR_API_TOKEN>"'})
|
custom_headers={'Authorization': '<YOUR_API_TOKEN>"'})
|
||||||
|
|
||||||
client.initialize_client()`,
|
client.initialize_client()`,
|
||||||
Javascript: `import { UnleashClient } from 'unleash-proxy-client';
|
JavaScript: `import { UnleashClient } from 'unleash-proxy-client';
|
||||||
|
|
||||||
const unleash = new UnleashClient({
|
const unleash = new UnleashClient({
|
||||||
url: '<YOUR_API_URL>',
|
url: '<YOUR_API_URL>',
|
||||||
@ -188,18 +188,18 @@ final unleash = UnleashClient(
|
|||||||
|
|
||||||
// TODO: add idiomatic way of checking flag status that will populate metrics
|
// TODO: add idiomatic way of checking flag status that will populate metrics
|
||||||
export const checkFlagCodeSnippets: Record<SdkName, string> = {
|
export const checkFlagCodeSnippets: Record<SdkName, string> = {
|
||||||
Node: `setInterval(() => {
|
'Node.js': `setInterval(() => {
|
||||||
console.log('Is enabled', unleash.isEnabled('<YOUR_FLAG>'));
|
console.log('Is enabled', unleash.isEnabled('<YOUR_FLAG>'));
|
||||||
}, 1000);
|
}, 1000);
|
||||||
`,
|
`,
|
||||||
Golang: ``,
|
Go: ``,
|
||||||
Ruby: ``,
|
Ruby: ``,
|
||||||
PHP: ``,
|
PHP: ``,
|
||||||
Rust: ``,
|
Rust: ``,
|
||||||
DotNet: ``,
|
'.NET': ``,
|
||||||
Java: ``,
|
Java: ``,
|
||||||
Python: ``,
|
Python: ``,
|
||||||
Javascript: ``,
|
JavaScript: ``,
|
||||||
React: ``,
|
React: ``,
|
||||||
Vue: ``,
|
Vue: ``,
|
||||||
Svelte: ``,
|
Svelte: ``,
|
||||||
|
@ -17,16 +17,16 @@ import flutter from '../../assets/icons/sdks/Logo-flutter.svg';
|
|||||||
export type SdkType = 'client' | 'frontend';
|
export type SdkType = 'client' | 'frontend';
|
||||||
export type Sdk = { name: SdkName; type: SdkType };
|
export type Sdk = { name: SdkName; type: SdkType };
|
||||||
export type ServerSdkName =
|
export type ServerSdkName =
|
||||||
| 'Node'
|
| 'Node.js'
|
||||||
| 'Golang'
|
| 'Go'
|
||||||
|
| '.NET'
|
||||||
| 'Ruby'
|
| 'Ruby'
|
||||||
| 'PHP'
|
| 'PHP'
|
||||||
| 'Rust'
|
| 'Rust'
|
||||||
| 'DotNet'
|
|
||||||
| 'Java'
|
| 'Java'
|
||||||
| 'Python';
|
| 'Python';
|
||||||
export type ClientSdkName =
|
export type ClientSdkName =
|
||||||
| 'Javascript'
|
| 'JavaScript'
|
||||||
| 'React'
|
| 'React'
|
||||||
| 'Vue'
|
| 'Vue'
|
||||||
| 'Svelte'
|
| 'Svelte'
|
||||||
@ -36,17 +36,17 @@ export type ClientSdkName =
|
|||||||
export type SdkName = ServerSdkName | ClientSdkName;
|
export type SdkName = ServerSdkName | ClientSdkName;
|
||||||
|
|
||||||
export const serverSdks: { name: ServerSdkName; icon: string }[] = [
|
export const serverSdks: { name: ServerSdkName; icon: string }[] = [
|
||||||
{ name: 'Node', icon: node },
|
{ name: 'Node.js', icon: node },
|
||||||
{ name: 'Golang', icon: go },
|
{ name: 'Go', icon: go },
|
||||||
{ name: 'Ruby', icon: ruby },
|
{ name: 'Ruby', icon: ruby },
|
||||||
{ name: 'PHP', icon: php },
|
{ name: 'PHP', icon: php },
|
||||||
{ name: 'Rust', icon: rust },
|
{ name: 'Rust', icon: rust },
|
||||||
{ name: 'DotNet', icon: dotnet },
|
{ name: '.NET', icon: dotnet },
|
||||||
{ name: 'Java', icon: java },
|
{ name: 'Java', icon: java },
|
||||||
{ name: 'Python', icon: python },
|
{ name: 'Python', icon: python },
|
||||||
];
|
];
|
||||||
export const clientSdks: { name: ClientSdkName; icon: string }[] = [
|
export const clientSdks: { name: ClientSdkName; icon: string }[] = [
|
||||||
{ name: 'Javascript', icon: javascript },
|
{ name: 'JavaScript', icon: javascript },
|
||||||
{ name: 'React', icon: react },
|
{ name: 'React', icon: react },
|
||||||
{ name: 'Vue', icon: vue },
|
{ name: 'Vue', icon: vue },
|
||||||
{ name: 'Svelte', icon: svelte },
|
{ name: 'Svelte', icon: svelte },
|
||||||
|
Loading…
Reference in New Issue
Block a user