Skip to content

Commit

Permalink
fix: package json fixes readme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja committed May 6, 2024
1 parent 07398a1 commit 39324b4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
SDK_ENV="local"
ENV_SDK_URL=""
ENV_BACKEND_URL=""
ENV_LOGGING_URL=""
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ Before you start the local setup, you will need an understanding of few keys -

### About Env Configs for SDK

- **`SDK_ENV`:** Specifies the environment in which the SDK will be running. This could be "local", "integ", "sandbox", or "prod". Different configurations are available for each environment. The default value is "local".

- **`ENV_BACKEND_URL`:** Sets the endpoint for all the APIs used within the SDK to interact with the backend service. If you are running your own backend service, you can configure and specify its endpoint here for local setups.

- **`ENV_LOGGING_URL`:** Specifies a custom logging endpoint where logs generated by the SDK can be sent. This allows you to view and manage logs according to your requirements.
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"webpack-merge": "^5.9.0"
},
"scripts": {
"build:dev": "webpack --config webpack.dev.js",
"build:dev-integ": "webpack --config webpack.dev.js",
"start": "webpack serve --config webpack.dev.js",
"build:prod": "webpack --config webpack.common.js",
"build:dev": "sdkEnv=sandbox webpack --config webpack.dev.js",
"build:dev-integ": "sdkEnv=integ webpack --config webpack.dev.js",
"start": "sdkEnv=local webpack serve --config webpack.dev.js",
"build:prod": "sdkEnv=prod webpack --config webpack.common.js",
"build": "webpack --config webpack.common.js",
"build:sandbox": "webpack --config webpack.common.js",
"build:integ": "webpack --config webpack.common.js",
"build:sandbox": "sdkEnv=sandbox webpack --config webpack.common.js",
"build:integ": "sdkEnv=integ webpack --config webpack.common.js",
"test": "react-scripts test",
"eject": "react-scripts eject",
"re:build": "rescript",
Expand Down
2 changes: 1 addition & 1 deletion webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const BundleAnalyzerPlugin =
require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");

const sdkEnv = process.env.SDK_ENV ?? "local";
const sdkEnv = process.env.sdkEnv ?? "local";
const envSdkUrl = process.env.ENV_SDK_URL ?? "";
const envBackendUrl = process.env.ENV_BACKEND_URL ?? "";
const envLoggingUrl = process.env.ENV_LOGGING_URL ?? "";
Expand Down
2 changes: 1 addition & 1 deletion webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require("path");
const dotenv = require("dotenv").config();
const { merge } = require("webpack-merge");
const common = require("./webpack.common.js");
const sdkEnv = process.env.SDK_ENV ?? "local";
const sdkEnv = process.env.sdkEnv ?? "local";

let backendEndPoint =
sdkEnv === "prod"
Expand Down

0 comments on commit 39324b4

Please sign in to comment.