Skip to content

Commit 7167c3f

Browse files
committed
feat: docs updates
1 parent 93c14ce commit 7167c3f

10 files changed

Lines changed: 38 additions & 41 deletions

File tree

docs/src/content/docs/ci-cd/app-releasing-process.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ To setup the release process to your app, you need to follow these steps:
7575

7676
First, make sure to create an [Expo](expo.dev) account then create a new organization for your project.
7777

78-
When then name of your organization is ready, you need to update the `EXPO_ACCOUNT_OWNER` variable in `env.js` file with the name of your organization.
78+
When then name of your organization is ready, you need to update the `EXPO_ACCOUNT_OWNER` variable in `env.ts` file with the name of your organization.
7979

8080
**For QA release:**
8181

8282
```bash
83-
pnpm run prebuild:staging
83+
pnpm run prebuild:preview
8484
```
8585

86-
The above command will regenerate the iOS and Android folders based on the `staging` configuration.
86+
The above command will regenerate the iOS and Android folders based on the `preview` configuration.
8787

8888
Then run the following command to build the app using EAS:
8989

@@ -92,8 +92,8 @@ You need to be logged in to EAS using `eas login` command before running this co
9292
:::
9393

9494
```bash
95-
pnpm run build:staging:ios
96-
pnpm run build:staging:android
95+
pnpm run build:preview:ios
96+
pnpm run build:preview:android
9797
```
9898

9999
The above commands will generate the required credentials for the build and store them in EAS servers so that we can use them later to trigger the build from GitHub actions.
@@ -118,9 +118,9 @@ All github workflows are already ready to be used in the starter. You just need
118118

119119
### Github action and env variables
120120

121-
For simplicity, we assume that all your environment variables are already added to your env files and have been pushed to your repository.
121+
For simplicity, we assume that all your environment variables are already added to your `.env` file and have been pushed to your repository.
122122

123-
If you prefer not to push env files (recommended), you need to add all your environment variables to GitHub secrets. Then, use `create-envfile` action to create the env file on the fly before the prebuild script.
123+
If you prefer not to push the `.env` file (recommended), you need to add all your environment variables to GitHub secrets. Then, use `create-envfile` action to create the env file on the fly before the prebuild script.
124124

125125
```yaml
126126
## .github/workflows/eas-build-prod.yml
@@ -130,16 +130,16 @@ If you prefer not to push env files (recommended), you need to add all your envi
130130
with:
131131
envkey_DEBUG: false
132132
envkey_SECRET_KEY: ${{ secrets.PRODUCTION_SECRET_KEY }}
133-
file_name: .env.production
133+
file_name: .env
134134

135135
- name: ⏱️ EAS Build
136136
uses: ./.github/actions/eas-build
137137
with:
138-
APP_ENV: production
138+
EXPO_PUBLIC_APP_ENV: production
139139
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
140140
```
141141
142-
This action will create a new env file `.env.production` with the `DEBUG` and `SECRET_KEY` variables you added to the action. so make sure to include all your env variables to the action.
142+
This action will create a new `.env` file with the `DEBUG` and `SECRET_KEY` variables you added to the action. so make sure to include all your env variables to the action.
143143

144144
## Create new release
145145

docs/src/content/docs/getting-started/create-new-app.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,12 @@ When you open the project on Cursor you will see a popup asking you to install t
6363
To ensure that your code is properly validated and formatted, we highly recommend installing all of the recommended extensions. However, if you're hesitant to install them all, we suggest at least installing the following extensions, as they are essential to our code validation and formatting on file save:
6464

6565
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
66-
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
6766
- [Tailwindcss IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
6867
- [Pretty TypeScript Errors](https://marketplace.visualstudio.com/items?itemName=yoavbls.pretty-ts-errors)
6968

7069
Here is the complete list of recommended extensions:
7170

7271
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
73-
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
7472
- [tailwindcss IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
7573
- [Auto Rename Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag)
7674
- [Auto close tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag)

docs/src/content/docs/getting-started/customize-app.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ We included TODO comments in the project to guide you to the areas requiring upd
2525

2626
As we are using expo to create the starter, updating the app icon and splash screen is straightforward. You only need to update the app icon and splash screen images inside the `assets` folder and run `expo prebuild` to update the app icon and splash screen.
2727

28-
As we are supporting multiple variants for development, staging and production environments you need 3 different icons but the right solution is to use the same icon with badges for each environment.
28+
As we are supporting multiple variants for development, preview and production environments you need 3 different icons but the right solution is to use the same icon with badges for each environment.
2929

3030
For more details about the app icon and splash screen, please refer to the expo documentation.
3131

docs/src/content/docs/getting-started/project-structure.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ If you open the new project in VSCode you will see the following structure:
9191
- resources.ts
9292
- types.ts
9393
- utils.tsx
94-
- env.js
9594
- storage.tsx
9695
- test-utils.tsx
9796
- utils.ts

docs/src/content/docs/getting-started/rules-and-conventions.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ For naming variables, functions, classes, interfaces, and enums, we follow camel
2828

2929
## Linting
3030

31-
Using a linter is a must in any JavaScript project. For starters, we are using ESLint with the React Native community config and some custom rules to ensure that we are following the rules and conventions related to file naming, Tailwind CSS classes, TypeScript types, import order, internationalization files, and more.
31+
Using a linter is a must in any JavaScript project. For starters, we are using ESLint with [@antfu/eslint-config](https://github.com/antfu/eslint-config) and some custom rules to ensure that we are following the rules and conventions related to file naming, Tailwind CSS classes, TypeScript types, import order, internationalization files, and more. This config also handles code formatting, so Prettier is no longer needed.
3232

3333
Here is the complete ESLint configuration file:
3434

35-
<Code file=".eslintrc.js" />
35+
<Code file="eslint.config.mjs" />
3636

3737
## Git Hooks with Husky
3838

docs/src/content/docs/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ When creating this starter kit, we had several guiding principles in mind::
2929

3030
- ✅ Latest Expo SDK with Custom Dev Client: Leverage the best of the Expo ecosystem while maintaining full control over your app.
3131
- 🎉 [TypeScript](https://www.typescriptlang.org/) for enhanced code quality and bug prevention through static type checking.
32-
- 💅 Minimal UI kit built with [TailwindCSS](https://www.nativewind.dev/), featuring common components essential for your app.
33-
- ⚙️ Multi-environment build support (Production, Staging, Development) using Expo configuration.
32+
- 💅 Minimal UI kit built with [TailwindCSS](https://tailwindcss.com/), featuring common components essential for your app.
33+
- ⚙️ Multi-environment build support (Production, Preview, Development) using Expo configuration.
3434
- 🦊 Husky for Git Hooks: Automate your git hooks and enforce code standards.
3535
- 💡 Clean project structure with Absolute Imports for easier code navigation and management.
3636
- 🚫 Lint-staged: Run Eslint and TypeScript checks on Git staged files to maintain code quality.
@@ -88,7 +88,7 @@ We value the feedback and contributions of our users, and we encourage you to le
8888

8989
- [Expo](https://docs.expo.io/)
9090
- [Expo Router](https://docs.expo.dev/router/introduction/)
91-
- [Nativewind](https://www.nativewind.dev/v4/overview)
91+
- [Uniwind](https://github.com/huozhi/uniwind)
9292
- [Flash list](https://github.com/Shopify/flash-list)
9393
- [React Query](https://tanstack.com/query/v4)
9494
- [Axios](https://axios-http.com/docs/intro)

docs/src/content/docs/recipes/sentry-setup.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ The starter kit did not come with Sentry pre-configured, but it's very easy to s
3939
```
4040

4141
:::note
42-
You can use the same Sentry configuration for all app variants (development, staging, production) as Sentry allows you to filter errors by app ID or package name in the dashboard. This simplifies setup and management while still providing the ability to distinguish between different environments.
42+
You can use the same Sentry configuration for all app variants (development, preview, production) as Sentry allows you to filter errors by app ID or package name in the dashboard. This simplifies setup and management while still providing the ability to distinguish between different environments.
4343
:::
4444

45-
It's crucial to add these variables to `env.js` for validation. `SENTRY_ORG` and `SENTRY_PROJECT` should be added as build-time variables, while `SENTRY_DSN` should be added as a client variable.
45+
It's crucial to add these variables to `env.ts` for validation. `SENTRY_ORG` and `SENTRY_PROJECT` should be added as build-time variables, while `SENTRY_DSN` should be added as a client variable.
4646

47-
Update your `env.js` file as follows:
47+
Update your `env.ts` file as follows:
4848

49-
```js title='env.js'
49+
```ts title='env.ts'
5050
// ... existing imports and configurations
5151

5252
const client = z.object({
@@ -124,11 +124,11 @@ The starter kit did not come with Sentry pre-configured, but it's very easy to s
124124
/* eslint-env node */
125125
// this replaces `const { getDefaultConfig } = require('expo/metro-config');`
126126
const { getSentryExpoConfig } = require('@sentry/react-native/metro');
127-
const { withNativeWind } = require('nativewind/metro');
127+
const { withUniwind } = require('uniwind/metro');
128128

129129
const config = getSentryExpoConfig(__dirname);
130130

131-
module.exports = withNativeWind(config, { input: './global.css' });
131+
module.exports = withUniwind(config, { input: './global.css' });
132132
```
133133

134134
8. Now you are ready to initialize Sentry in your app.

docs/src/content/docs/testing/end-to-end-testing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The starter comes with a bunch of GitHub actions that will help you run the test
6363
> for now we only support running tests on Android, we are working on adding support for iOS.
6464
6565
- `e2e-android.yml` - Triggered when a PR is labeled with `android-test-github` or run manually from the actions tab in GitHub.
66-
This action will generate a staging build for the app, set up the emulator, and run the tests using Maestro.
66+
This action will generate a preview build for the app, set up the emulator, and run the tests using Maestro.
6767

6868
- `e2e-android-maestro.yml` - Triggered when a PR is labeled with `android-test-maestro-cloud` or run manually from the actions tab in GitHub.
6969
This action will run the tests using Maestro Cloud. You will need to add your Maestro Cloud token to the secrets in GitHub.

docs/src/content/docs/ui-and-theme/components.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ head:
99
import { FileTree } from '@astrojs/starlight/components';
1010
import CodeBlock from '../../../components/code.astro';
1111

12-
The starter comes with a set of basic components and a simple design system based on Nativewind to help you get started and save you time.
12+
The starter comes with a set of basic components and a simple design system based on Uniwind to help you get started and save you time.
1313

1414
All those components can be found in the `src/components/ui` folder. Our philosophy is to keep the components as simple as possible and to avoid adding too much logic to them. This way, they are easier to reuse and customize.
1515

@@ -72,8 +72,8 @@ const MyComponent = () => {
7272

7373
## Image
7474

75-
For the `Image` component, we use the `expo-image` library to provide a fast and performant image component. The `Image` component is a wrapper around the `Image` component from `expo-image` package with additional styling provided by `nativewind`.
76-
The `cssInterop` function from `nativewind` is used to apply styling and, in this way, the `className` property is applied to the `style` property of the `Image` component.
75+
For the `Image` component, we use the `expo-image` library to provide a fast and performant image component. The `Image` component is a wrapper around the `Image` component from `expo-image` package with additional styling provided by `uniwind`.
76+
The `cssInterop` function from `uniwind` is used to apply styling and, in this way, the `className` property is applied to the `style` property of the `Image` component.
7777

7878
<CodeBlock file="src/components/ui/image.tsx" />
7979

@@ -156,7 +156,7 @@ Each variant should include styles for the `container`, `indicator`, and `label`
156156

157157
**Use Case**
158158

159-
<CodeBlock file="src/components/buttons.tsx" />
159+
<CodeBlock file="src/features/style-demo/components/buttons-demo.tsx" />
160160

161161
## Input
162162

docs/src/content/docs/ui-and-theme/ui-theming.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ How we manage the UI and theming of the application.
1414

1515
For the past few years, we have tried multiple approaches to style our React Native apps: Stylesheet API, styled-components, restyle, and more.
1616

17-
Right now, we are confident that using Tailwind CSS with React Native is the right solution, especially after trying [Nativewind](https://www.nativewind.dev/v4/overview).
17+
Right now, we are confident that using Tailwind CSS with React Native is the right solution, especially after trying [Uniwind](https://github.com/huozhi/uniwind).
1818

1919
If you are familiar with Tailwind CSS on the web you will find it very easy to use and you can even copy past your styling from a web application and should work without issues with react native too with some minor adjustments of course.
2020

@@ -28,23 +28,23 @@ We would also recommend playing with the [Tailwind CSS playground](https://play.
2828

2929
:::
3030

31-
## About Nativewind
31+
## About Uniwind
3232

33-
Nativewind is a library that allows you to use Tailwind CSS with react native. Nativewind achieves this by pre-compiling the Tailwind CSS classes into react native stylesheets with a minimal runtime to selectively apply the styles.
33+
Uniwind is a library that allows you to use Tailwind CSS with React Native. Uniwind achieves this by pre-compiling Tailwind CSS classes into React Native stylesheets with a minimal runtime to selectively apply the styles.
3434

35-
NativeWind version 4 introduces several improvements and enhancements and provides a more efficient development experience. The transition to version 4 introduces a different approach that eliminates the need for creating and wrapping our own components with the `styled` component. Thereby, this utility-first approach simplifies the styling process by using classes and applying styles directly within JSX elements.
35+
Uniwind provides an efficient development experience with a utility-first approach that simplifies the styling process by using classes and applying styles directly within JSX elements.
3636

37-
For more details about Nativewind you can check their [documentation](https://www.nativewind.dev/v4/overview/).
37+
For more details about Uniwind you can check their [documentation](https://github.com/huozhi/uniwind).
3838

3939
Here is an example of how your component should look like:
4040

4141
<CodeBlock file="src/features/feed/components/post-card.tsx" />
4242

4343
## Configuration
4444

45-
Nativewind is the same as Tailwind CSS, it comes with a default theme and colors that you can override by creating your own theme and colors.
45+
Uniwind is the same as Tailwind CSS, it comes with a default theme and colors that you can override by creating your own theme and colors.
4646

47-
You need to understand that Nativewind is a library that is built on top of Tailwind CSS. Feel free to add any Tailwind CSS config that you want to use in your application such as updating colors, spacing, typography, etc.
47+
You need to understand that Uniwind is a library that is built on top of Tailwind CSS. Feel free to add any Tailwind CSS config that you want to use in your application such as updating colors, spacing, typography, etc.
4848

4949
We have created a `ui/theme` folder where you can find our custom colors that have been imported into `tailwind.config.js` and used as a theme for our demo application. You can add your own color palette and use them in your components with Tailwind class names.
5050

@@ -69,7 +69,7 @@ This template comes with dark mode support out of the box, and it's very easy to
6969

7070
### Implementation
7171

72-
Since we're using [nativewind](https://www.nativewind.dev/) (which uses Tailwind CSS under the hood) and expo-router we let them handle the application of theme, and we just take care of the colors we want.
72+
Since we're using [uniwind](https://github.com/huozhi/uniwind) (which uses Tailwind CSS under the hood) and expo-router we let them handle the application of theme, and we just take care of the colors we want.
7373
We set the colors in `ui/theme/colors.js` and we use them in our hook `useThemeConfig.tsx` to get the theme object that we pass to ThemeProvider directly. For more information check out [expo-router](https://docs.expo.dev/router/appearance/)
7474

7575
<CodeBlock file="src/components/ui/use-theme-config.tsx" />
@@ -78,7 +78,7 @@ We set the colors in `ui/theme/colors.js` and we use them in our hook `useThemeC
7878

7979
### How do we handle theme changes?
8080

81-
We use the `loadSelectedTheme` function to load the theme from the storage if there's a theme saved in the storage, otherwise, we let nativwind use the default theme (system).
81+
We use the `loadSelectedTheme` function to load the theme from the storage if there's a theme saved in the storage, otherwise, we let uniwind use the default theme (system).
8282
To set the selected theme, we use the `useSelectedTheme` hook, which sets the theme in the storage and updates the color scheme of the app.
8383

8484
<CodeBlock file="src/lib/hooks/use-selected-theme.tsx" />
@@ -94,7 +94,7 @@ To add the values for the light mode, you can simply write them directly in your
9494
If you want to use the style prop, you can use the `useColorScheme` hook to get the current color scheme and use it to apply the desired style. However, **in most cases, you won't need it** as the dark: variant will do the job.
9595

9696
```tsx
97-
import { useColorScheme } from 'nativewind';
97+
import { useColorScheme } from 'uniwind';
9898

9999
const colorScheme = useColorScheme();
100100
const style =
@@ -103,4 +103,4 @@ const style =
103103
: { backgroundColor: 'white' };
104104
```
105105

106-
For more details about dark mode, you can check [tailwind](https://tailwindcss.com/docs/dark-mode) and [nativewind](https://www.nativewind.dev/core-concepts/dark-mode)
106+
For more details about dark mode, you can check [tailwind](https://tailwindcss.com/docs/dark-mode) and [uniwind](https://github.com/huozhi/uniwind)

0 commit comments

Comments
 (0)