Skip to content

Latest commit

 

History

History
72 lines (44 loc) · 2.61 KB

INSTALL.md

File metadata and controls

72 lines (44 loc) · 2.61 KB

Development Environment Setup

Development tools (pre-requisites)

  • Node.js with npm (latest LTS version recommended).

  • Flutter (latest stable version recommended).

First-time setup

  1. Clone the repository

    If you haven’t already, clone the repository to your local machine:

    git clone [email protected]:Alejandro-FA/Alejandro-FA.github.io.git
    cd Alejandro-FA.github.io
  2. Install the project dependencies

    npm run setup:dev

Setting Up Git Hooks

This project includes custom Git hooks to ensure code quality and consistency. To use these hooks, you’ll need to configure Git to use the provided hooks directory.

Steps to configure git hooks

  1. Configure git to use the custom hooks directory

    git config core.hooksPath .githooks
  2. Verify the configuration

    To ensure that the configuration is set up correctly, you can check your git settings:

    git config --get core.hooksPath

    This should output .githooks, confirming that Git is using the correct directory.

What do the hooks do?

The hooks in this project are designed to run automated checks before certain git operations. For example:

  • Pre-commit hook: Before you commit changes, the pre-commit hook will run a static code analysis with npm run lint. It will also run tests using npm run test. If either the static analysis or the tests fail, the commit will be aborted.

  • Pre-push hook: Before pushing changes to production, it ensures that the project builds successfully using npm run build.

By setting up these hooks, you help maintain code quality and prevent potential issues from being published to production.

Changing the flutter debug browser (optional)

By default, Flutter web apps will try to run in Google Chrome (check the Getting Started guide for more information on how to configure flutter for web development). If you prefer to use another Chromium-based browser instead of Chrome (e.g. Edge, Opera, Brave...), add the following lines to your .bash_profile file (if you use bash) or your .zshenv file (if you use zsh):

export CHROME_EXECUTABLE="path/to/broswer/executable"
export CHROME_PATH="${CHROME_EXECUTABLE}" # This is for Lighthouse

For example, to use Brave Browser in macOS:

export CHROME_EXECUTABLE="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
export CHROME_PATH="${CHROME_EXECUTABLE}"