Project Commands
Relevant source files
The following files were used as context for generating this wiki page:
The eefashiondesign project utilizes a set of npm scripts to streamline the development, testing, and maintenance workflow. These commands, defined in the package.json file, provide a standardized way to perform common tasks such as starting the development server, running the application on different platforms, and ensuring code quality. The project is built with React Native and Expo, and the commands are tailored to this technology stack.
Sources: README.md:88-94
Core Development Commands
These commands are essential for the daily development workflow, from installing dependencies to running the application on various target platforms.
Sources: README.md:76-86
Installation and Setup
Before running the application, dependencies must be installed.
| Command | Description |
|---|---|
npm install | Installs all project dependencies defined in package.json. This is the first command to run after cloning the repository. |
Sources: README.md:79-82
Running the Application
The following commands start the Expo development server and run the application on specific platforms.
| Command | Description |
|---|---|
npm start | Starts the Expo development server, which provides a central interface for running the app on various platforms and viewing logs. |
npm run web | Runs the application in a web browser. |
npm run ios | Runs the application on the iOS simulator (requires a Mac environment). |
npm run android | Runs the application on the Android emulator. |
Sources: README.md:88-94
The diagram below illustrates the typical development startup flow.
This diagram shows how a developer can use different npm run commands to launch the application on their platform of choice via the Expo development server.
Sources: README.md:88-94
Dependency and Maintenance Commands
These commands are used for managing project dependencies and maintaining code health.
Dependency Management
Proper dependency management is crucial for compatibility, especially within the Expo ecosystem.
| Command | Description |
|---|---|
npx expo install --fix | Fixes package version mismatches to ensure all dependencies are compatible with the project's Expo SDK version. This is critical for resolving compatibility issues. |
npm install <package-name> | Installs a new package. For example, npm install react-native-dotenv was used to add environment variable support. |
npm audit fix | Scans the project for security vulnerabilities and automatically installs compatible updates to vulnerable dependencies. |
Sources: BUGS_FIXED_AND_IMPROVEMENTS.md:25-29, SECURITY_AND_CLEANUP_FIXES.md:41-43, CRITICAL_BUGS_FIXED.md:168-170
Code Quality and Security
The project includes commands for linting and auditing code to maintain quality and security.
| Command | Description |
|---|---|
npm run lint | Lints the codebase to check for style and syntax errors, ensuring code consistency. |
npm audit | Runs a security audit of the project's dependencies and reports any found vulnerabilities. |
Sources: README.md:96, SECURITY_AND_CLEANUP_FIXES.md:111-112
The following flowchart outlines the recommended workflow for ensuring code quality before committing changes.
This diagram shows a process where code is first linted, and then its dependencies are audited for security vulnerabilities before being considered ready for a pull request.
Sources: README.md:96, CRITICAL_BUGS_FIXED.md:168-170
Testing
The project has a dedicated command for running its test suite.
| Command | Description |
|---|---|
npm test | Executes the project's automated tests to verify functionality and prevent regressions. |
Sources: README.md:95
Summary
The npm scripts in this project provide a powerful and consistent interface for developers. They cover the entire development lifecycle, from initial setup and daily development to dependency management, code quality checks, and testing. Adhering to these commands ensures a smoother development experience and a more stable, secure application.