Skip to content

Commit

Permalink
feat: A new EnvironmentVariablesPlugin (#208)
Browse files Browse the repository at this point in the history
* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* More stuff

* Updated docs

* Added a changeset file

* Fix linting

* More stuff
  • Loading branch information
patricklafrance authored Sep 27, 2024
1 parent 89aa3fe commit a41b2bc
Show file tree
Hide file tree
Showing 77 changed files with 1,919 additions and 556 deletions.
5 changes: 5 additions & 0 deletions .changeset/nasty-spiders-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@squide/env-vars": major
---

First release of the new `EnvironmentVariablesPlugin`. For additional information read the [guide](https://gsoft-inc.github.io/wl-squide/guides/use-environment-variables/).
1 change: 1 addition & 0 deletions docs/guides/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ expanded: true
- [Override the host layout](./override-the-host-layout.md)
- [Use modular tabs](./use-modular-tabs.md)
- [Use feature flags](./use-feature-flags.md)
- [Use environment variables](./use-environment-variables.md)
- [Setup i18next](./setup-i18next.md)
- [Develop a module in isolation](./develop-a-module-in-isolation.md)
- [Override a React context](./override-a-react-context.md)
Expand Down
7 changes: 5 additions & 2 deletions docs/guides/develop-a-module-in-isolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ To develop their own independent module, a team **should not need to install the
To achieve this, the first step is to extract the application shell from the host application. There are various ways to accomplish this, but in this guide, we'll transform the host application into a monorepo and introduce a new local package named `@sample/shell` specifically for this purpose:

``` !#4
host
monorepo
├── app
├── packages
├── libs
├────── shell
├───────── src
├─────────── RootLayout.tsx
Expand All @@ -22,6 +22,9 @@ host
├───────── package.json
├───────── tsup.dev.ts
├───────── tsup.build.ts
├── modules
├───────── local-module
├───────── remote-module
```

## Create a shell package
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/setup-i18next.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ Then, update the host application boostrapping code to register an instance of t
```tsx !#13-22 host/src/bootstrap.tsx
import { createRoot } from "react-dom/client";
import { ConsoleLogger, RuntimeContext, FireflyRuntime, registerRemoteModules, type RemoteDefinition } from "@squide/firefly";
import { i18nextPlugin } from "@squide/i18next";
import { App } from "./App.tsx";
import { registerHost } from "./register.tsx";
import { registerShell } from "@sample/shell";
import { i18nextPlugin } from "@sample/i18next";

const Remotes: RemoteDefinition[] = [
{ url: name: "remote1" }
Expand Down Expand Up @@ -532,7 +532,7 @@ return (

## Try it :rocket:

Start the development servers using the `dev` script. The homepage and the navigation items should render the english (`en-US`) resources. Then append `?language=fr-CA` to the URL. The homepage and the navigation items should now render the french (`fr-CA`) resources.
Start the application in a development environment using the `dev` script. The homepage and the navigation items should render the english (`en-US`) resources. Then append `?language=fr-CA` to the URL. The homepage and the navigation items should now render the french (`fr-CA`) resources.

### Troubleshoot issues

Expand Down
Loading

0 comments on commit a41b2bc

Please sign in to comment.