From 4f5ad07ace55f067a3d75c6fe16a538638b17c3d Mon Sep 17 00:00:00 2001 From: Tuan Dang Date: Mon, 28 Nov 2022 22:34:31 -0500 Subject: [PATCH] Add more framework integrations to docs --- docs/integrations/frameworks/angular.mdx | 5 +++ docs/integrations/frameworks/fibre.mdx | 5 +++ docs/integrations/frameworks/gatsby.mdx | 14 +++++---- docs/integrations/frameworks/nextjs.mdx | 10 ++++-- docs/integrations/frameworks/nuxt.mdx | 5 +++ docs/integrations/frameworks/react.mdx | 2 +- docs/integrations/frameworks/vite.mdx | 40 ++++++++++++++++++++++++ docs/integrations/frameworks/vue.mdx | 5 +++ docs/integrations/overview.mdx | 7 ++++- docs/mint.json | 3 ++ 10 files changed, 86 insertions(+), 10 deletions(-) create mode 100644 docs/integrations/frameworks/angular.mdx create mode 100644 docs/integrations/frameworks/fibre.mdx create mode 100644 docs/integrations/frameworks/nuxt.mdx create mode 100644 docs/integrations/frameworks/vite.mdx create mode 100644 docs/integrations/frameworks/vue.mdx diff --git a/docs/integrations/frameworks/angular.mdx b/docs/integrations/frameworks/angular.mdx new file mode 100644 index 000000000..31c8e6790 --- /dev/null +++ b/docs/integrations/frameworks/angular.mdx @@ -0,0 +1,5 @@ +--- +title: "Angular" +--- + +Instructions coming soon. diff --git a/docs/integrations/frameworks/fibre.mdx b/docs/integrations/frameworks/fibre.mdx new file mode 100644 index 000000000..0d281a5f3 --- /dev/null +++ b/docs/integrations/frameworks/fibre.mdx @@ -0,0 +1,5 @@ +--- +title: "Fibre" +--- + +Coming soon. diff --git a/docs/integrations/frameworks/gatsby.mdx b/docs/integrations/frameworks/gatsby.mdx index 4e0b576c8..cc3ddb0af 100644 --- a/docs/integrations/frameworks/gatsby.mdx +++ b/docs/integrations/frameworks/gatsby.mdx @@ -28,12 +28,14 @@ infisical init ... ``` -## Start your server with environment variables injected +## Start your development server with environment variables injected ```bash -yarn run start - -# or start development server - -yarn run develop +npm run develop ``` + + + Note that for environment variables to be exposed to the client, you'll have + to prefix them with `GATSBY_`. Read more about that + [here](https://www.gatsbyjs.com/docs/how-to/local-development/environment-variables/#accessing-environment-variables-in-the-browser). + diff --git a/docs/integrations/frameworks/nextjs.mdx b/docs/integrations/frameworks/nextjs.mdx index 2b7a56468..5fa87297d 100644 --- a/docs/integrations/frameworks/nextjs.mdx +++ b/docs/integrations/frameworks/nextjs.mdx @@ -29,9 +29,15 @@ infisical init ## Start your server with environment variables injected ```bash -yarn run dev +npm run build && npm run start -# or +# or start development server npm run dev ``` + + + Note that for environment variables to be exposed to the client, you'll have + to prefix them with `NEXT_PUBLIC_`. Read more about that + [here](https://nextjs.org/docs/basic-features/environment-variables). + diff --git a/docs/integrations/frameworks/nuxt.mdx b/docs/integrations/frameworks/nuxt.mdx new file mode 100644 index 000000000..165da7e32 --- /dev/null +++ b/docs/integrations/frameworks/nuxt.mdx @@ -0,0 +1,5 @@ +--- +title: "Nuxt" +--- + +Instructions coming soon. diff --git a/docs/integrations/frameworks/react.mdx b/docs/integrations/frameworks/react.mdx index 80ee250cb..48523e179 100644 --- a/docs/integrations/frameworks/react.mdx +++ b/docs/integrations/frameworks/react.mdx @@ -30,5 +30,5 @@ infisical init ## Start your server with environment variables injected ```bash -yarn start +npm start ``` diff --git a/docs/integrations/frameworks/vite.mdx b/docs/integrations/frameworks/vite.mdx new file mode 100644 index 000000000..7c8b0642c --- /dev/null +++ b/docs/integrations/frameworks/vite.mdx @@ -0,0 +1,40 @@ +--- +title: "Vite" +--- + +Prerequisite: [Install the CLI](/cli/overview) + +## Initialize Infisical for your [Vite](https://vitejs.dev) app + +```bash +# move to your Vite app +cd /path/to/project + +# initialize infisical +infisical init +``` + +## Modify the start script in your `package.json` + +```json +... +"scripts": { + "dev": "infisical run -- vite", + "build": "infisical run -- vite build", + "preview": "infisical run -- vite preview" +} +... +``` + +## Start your development server with environment variables injected + +```bash +npm run dev +``` + + + Note that for environment variables to be exposed to the client, you'll have + to prefix them with `VITE_` and export them from the `vite.config.js` file. + Read more about that [here](https://vitejs.dev/guide/env-and-mode.html) and + [here](https://main.vitejs.dev/config). + diff --git a/docs/integrations/frameworks/vue.mdx b/docs/integrations/frameworks/vue.mdx new file mode 100644 index 000000000..d71d8227d --- /dev/null +++ b/docs/integrations/frameworks/vue.mdx @@ -0,0 +1,5 @@ +--- +title: "Vue" +--- + +Coming soon. diff --git a/docs/integrations/overview.mdx b/docs/integrations/overview.mdx index 887efbec8..89511afdc 100644 --- a/docs/integrations/overview.mdx +++ b/docs/integrations/overview.mdx @@ -23,11 +23,16 @@ Missing an integration? Throw in a [request](https://github.com/Infisical/infisi | GitHub Actions | CI/CD | Coming soon | | Jenkins | CI/CD | Coming soon | | [React](/integrations/frameworks/react) | Framework | Available | -| [Express](integrations/frameworks/express) | Framework | Available | +| [Vue](/integrations/frameworks/vue) | Framework | Coming soon | +| [Angular](/integrations/frameworks/angular) | Framework | Coming soon | +| [Express](/integrations/frameworks/express) | Framework | Available | | [Next.js](/integrations/frameworks/nextjs) | Framework | Available | | [NestJS](/integrations/frameworks/nestjs) | Framework | Available | +| [Nuxt](/integrations/frameworks/nuxt) | Framework | Coming soon | | [Gatsby](/integrations/frameworks/gatsby) | Framework | Available | | [Remix](/integrations/frameworks/remix) | Framework | Coming soon | +| [Vite](/integrations/frameworks/vite) | Framework | Available | +| [Fibre](/integrations/frameworks/fibre) | Framework | Coming soon | | [Django](/integrations/) | Framework | Coming soon | | [Flask](/integrations/frameworks/flask) | Framework | Available | | [Laravel](/integrations/frameworks/laravel) | Framework | Coming soon | diff --git a/docs/mint.json b/docs/mint.json index 04891f7b8..0bdaecd16 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -134,11 +134,14 @@ "group": "Frameworks", "pages": [ "integrations/frameworks/react", + "integrations/frameworks/vue", + "integrations/frameworks/angular", "integrations/frameworks/express", "integrations/frameworks/nextjs", "integrations/frameworks/nestjs", "integrations/frameworks/gatsby", "integrations/frameworks/remix", + "integrations/frameworks/vite", "integrations/frameworks/django", "integrations/frameworks/flask", "integrations/frameworks/laravel",