Available npm scripts for development and project management.
npm run start
# or
npm run startStarts the Expo development server. Press:
ifor iOS simulatorafor Android emulatorwfor web browser
npm run ios # Start on iOS simulator
npm run android # Start on Android emulator
npm run web # Start in web browsernpm run lint # Run ESLint
npm run lint:fix # Run ESLint with auto-fixnpm run typecheck # Run TypeScript compiler checknpm run format # Format all files with Prettier
npm run format:check # Check formatting without changesnpm run check # Run typecheck + lint + format:checknpm run cleanRemoves example screens and resets tabs to minimal templates.
What it removes:
src/app/(examples)/folder- Example content in tab screens
What it keeps:
- Design system and components
- Form components and validation
- Hooks and utilities
- Navigation structure
- Auth flow structure
After running:
- Update
app.jsonwith your app details - Customize tab screens
- Update auth screens with your logic
npm run generate:iconsGenerates all required app icon sizes from a source image.
Setup:
- Create a 1024x1024 PNG image
- Save as
assets/images/icon-source.png - Run the script
Generated files:
assets/images/icon.png(1024x1024)assets/images/adaptive-icon.png(1024x1024)assets/images/favicon.png(48x48)
npm run generate:splashGenerates splash screen from a source logo.
Setup:
- Create a logo image (512x512 recommended)
- Save as
assets/images/splash-source.png - Run the script
Output:
assets/images/splash.pngwith centered logo
Customization:
Edit scripts/generate-splash.ts to change:
BACKGROUND_COLOR- splash backgroundLOGO_SIZE- logo size in splashOUTPUT_SIZE- splash dimensions
npm run build:ios # Build for iOS
npm run build:android # Build for AndroidRequires EAS CLI setup. See Expo EAS Build docs.
Git hooks are managed by Lefthook:
- TypeScript check
- ESLint with auto-fix
- Prettier formatting
- Full TypeScript check
- Full ESLint check
LEFTHOOK=0 git commit -m "message"LEFTHOOK_EXCLUDE=lint git commit -m "message"| File | Purpose |
|---|---|
eslint.config.mjs |
ESLint configuration |
prettier.config.mjs |
Prettier configuration |
lefthook.yml |
Git hooks configuration |
tsconfig.json |
TypeScript configuration |
.editorconfig |
Editor settings |
.vscode/settings.json |
VSCode settings |
Add to package.json:
{
"scripts": {
"custom:script": "tsx scripts/custom-script.ts"
}
}Create script in scripts/ folder:
// scripts/custom-script.ts
import * as fs from 'fs';
import * as path from 'path';
async function main() {
console.log('Running custom script...');
// Your logic here
}
main().catch(console.error);