Overview
The Rippler project includes various npm scripts for development, building, testing, and deployment. All scripts are defined inpackage.json and can be run using npm run <script-name>.
Development Scripts
Scripts for local development and testing.expo:dev
Full Command
Full Command
This command sets up environment variables for Replit deployment:
EXPO_PACKAGER_PROXY_URL- Proxy URL for the Metro bundlerREACT_NATIVE_PACKAGER_HOSTNAME- Hostname for the packagerEXPO_PUBLIC_DOMAIN- Public domain for API connections
- Local mobile app development
- Testing on physical devices or emulators
- Hot reload during feature development
server:dev
tsx for TypeScript execution.
Full Command
Full Command
- Hot reload on file changes
- Development environment configuration
- Enhanced error messages
- Request logging enabled
- Backend API development
- Database operation testing
- Full-stack development (run alongside
expo:dev)
Build Scripts
Scripts for creating production-ready builds.expo:start:static:build
Full Command
Full Command
--no-dev- Disables development mode--minify- Enables code minification--localhost- Serves on localhost only
- Used internally by
expo:static:build - Not typically run directly
expo:static:build
Full Command
Full Command
Output:
- Production deployments
- Creating standalone bundles
- Deploying to Replit or similar platforms
server:build
Full Command
Full Command
--platform=node- Target Node.js environment--packages=external- Keep npm packages external--bundle- Bundle all code into single file--format=esm- Output ES modules--outdir=server_dist- Output toserver_dist/directory
server_dist/index.js
When to use:
- Production server deployments
- Optimizing server bundle size
- Before running
server:prod
server:prod
Full Command
Full Command
- Production deployments
- After building with
server:build - Performance testing with optimized code
Database Scripts
db:push
Full Command
Full Command
- Reads schema from
shared/schema.ts - Compares with current database state
- Generates and executes SQL to sync schema
- Updates database to match schema definitions
DATABASE_URLenvironment variable must be set- PostgreSQL database must be accessible
- After modifying
shared/schema.ts - Setting up a new development environment
- Syncing database schema changes
This command directly modifies the database without creating migration files. For production, consider using
drizzle-kit generate to create migrations first.Code Quality Scripts
lint
Full Command
Full Command
- Code style violations
- Potential bugs
- Best practice violations
- Prettier formatting issues
eslint.config.js with Expo and Prettier presets
When to use:
- Before committing code
- In CI/CD pipelines
- During code review
lint:fix
Full Command
Full Command
- Formatting issues
- Auto-fixable ESLint rules
- Import ordering
- Trailing whitespace
Not all issues can be auto-fixed. Manual intervention may be required for some violations.
- Before committing code
- After major refactoring
- To quickly clean up formatting
check:types
Full Command
Full Command
- Type mismatches
- Missing type annotations
- Invalid type assertions
- Unused variables (with strict mode)
- Before building for production
- In CI/CD pipelines
- During development to catch type errors early
check:format
Full Command
Full Command
- JavaScript (
.js) - TypeScript (
.ts,.tsx) - CSS (
.css) - JSON (
.json)
0- All files are formatted correctly1- Some files need formatting
- In CI/CD pipelines
- Pre-commit hooks
- Before code review
format
Full Command
Full Command
- Indentation (2 spaces)
- Line length (80 characters)
- Quotes (double quotes)
- Semicolons
- Trailing commas
- Before committing code
- After adding new files
- To maintain consistent code style
Common Workflows
Full-Stack Development
Code Quality Check
Production Build
Pre-Commit Workflow
Environment Variables
Key environment variables used by these scripts:PostgreSQL connection string for Drizzle ORMExample:
postgresql://user:password@localhost:5432/ripplerReplit development domain (automatically set on Replit)
Public domain for API connections (used by Expo client)
Node environment:
development or productionServer port (defaults to 5000)
Script Chaining
You can chain multiple scripts using&&:
Next Steps
Setup Guide
Set up your development environment
Project Structure
Understand the codebase layout
Testing
Learn about testing approaches
Architecture
Learn about Rippler’s architecture