@lgsm/modules 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,23 +41,27 @@ Link download : https://www.npmjs.com/package/@lgsm/modules
41
41
  | `coverage` | Generate a coverage report, with **v8**. |
42
42
 
43
43
  ## How to setup API Service
44
- 1. Create your environment files (eg: '.env.dev' or '.env.prod') and define your base URL
44
+ 1. Installation
45
+ ```
46
+ npm i
47
+ ```
48
+ 2. Create your environment files (eg: '.env.dev' or '.env.prod') and define your base URL
45
49
  ```
46
50
  VITE_BASE_URL=https://your-api-domain.com
47
51
  ```
48
- 2. Update your package.json to include appropriate Vite modes for each environment
52
+ 3. Update your package.json to include appropriate Vite modes for each environment
49
53
  ```"scripts": {
50
54
  "dev": "vite --mode dev [your settings]",
51
55
  "prod": "vite --mode prod [your settings]"
52
56
  }
53
57
  ```
54
- 3. In your main.tsx, (or wherever your app initializes), import and set up the base URL using setupBaseURL.
58
+ 4. In your main.tsx, (or wherever your app initializes), import and set up the base URL using setupBaseURL.
55
59
  ```
56
60
  import { setupBaseURL } from "@lgsm/modules";
57
61
 
58
62
  setupBaseURL(import.meta.env.VITE_BASE_URL);
59
63
  ```
60
- 4. The API client automatically handles certain error codes and displays notifications (popups). To enable this behavior, make sure the NotificationContainer component is rendered at the root level of your app, for example in App.tsx:
64
+ 5. The API client automatically handles certain error codes and displays notifications (popups). To enable this behavior, make sure the NotificationContainer component is rendered at the root level of your app, for example in App.tsx:
61
65
  ```
62
66
  <ErrorBoundary fallback={}>
63
67
  <Suspense fallback={<ThreeDotsLoader />}>