Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 9 additions & 18 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Setup Environment
description: 'Set up Node.js, pnpm, Expo CLI'
description: 'Set up Node.js, yarn, Expo CLI'
inputs:
EXPO_TOKEN:
required: true
Expand All @@ -11,34 +11,25 @@ runs:
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
cache: 'yarn'

- uses: actions/cache@v4
name: Setup pnpm cache
name: Setup yarn cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
path: ~/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
${{ runner.os }}-yarn-

- uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ inputs.EXPO_TOKEN }}
packager: pnpm
packager: yarn

- name: Install Dependencies
run: pnpm install --frozen-lockfile
run: yarn install --frozen-lockfile
shell: bash
- name: Install example dependencies
run: cd example && pnpm install --frozen-lockfile
run: cd example && yarn install --frozen-lockfile
shell: bash
8 changes: 4 additions & 4 deletions .github/workflows/ci-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
- uses: ./.github/actions/setup

- name: Run ESLint
run: pnpm lint
run: yarn lint

- name: Run Prettier
run: pnpm format:check
run: yarn format:check

- name: Run TypeScript
run: pnpm type:check
run: yarn type:check

- name: Run Tests
run: pnpm test
run: yarn test
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
cache: 'yarn'
- run: yarn install
- run: yarn lint

publish:
Expand All @@ -25,7 +25,7 @@ jobs:
deployments: write
environment:
name: npm
url: https://www.npmjs.com/package/expo-alternate-app-icons
url: https://www.npmjs.com/package/@strv/react-native-hero-carousel
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -34,9 +34,9 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
cache: 'yarn'
- run: yarn install
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx auto shipit
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm type:check
yarn type:check
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ npm install @strv/react-native-hero-carousel
# or
yarn add @strv/react-native-hero-carousel
# or
pnpm add @strv/react-native-hero-carousel
yarn add @strv/react-native-hero-carousel
```

### Peer Dependencies
Expand Down Expand Up @@ -208,8 +208,8 @@ We provide a comprehensive example app showcasing all the carousel features. You

```bash
cd example
pnpm install
pnpm start
yarn install
yarn start
```

Then scan the QR code with Expo Go or run on simulator. See the [example app README](./example/README.md) for detailed setup instructions.
Expand Down
11 changes: 5 additions & 6 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This example app demonstrates all the features and capabilities of the `@strv/re
### Prerequisites

- [Node.js](https://nodejs.org/) (v18 or higher)
- [pnpm](https://pnpm.io/) (recommended) or npm/yarn
- [yarn](https://yarnpkg.com/) (recommended) or npm/pnpm
- [Expo CLI](https://docs.expo.dev/get-started/installation/)
- iOS Simulator (macOS) or Android Emulator

Expand All @@ -16,17 +16,16 @@ This example app demonstrates all the features and capabilities of the `@strv/re
1. **Install dependencies**

```bash
pnpm install
yarn install
```

2. **Start the development server**

```bash
pnpm start
yarn start
```

3. **Run on your preferred platform**

- **iOS Simulator**: Press `i` in the terminal or scan QR with Expo Go
- **Android Emulator**: Press `a` in the terminal or scan QR with Expo Go
- **Physical Device**: Install [Expo Go](https://expo.dev/go) and scan the QR code
Expand Down Expand Up @@ -163,7 +162,7 @@ The example app includes custom hooks that you can reference:
**Metro bundler issues:**

```bash
pnpm start --clear-cache
yarn start --clear-cache
```

**iOS build issues:**
Expand All @@ -175,7 +174,7 @@ cd ios && pod install && cd ..
**Android build issues:**

```bash
pnpm android --clear
yarn android --clear
```

**Video not playing:**
Expand Down
Loading
Loading