-
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
-
Install the project dependencies
npm run setup:dev
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.
-
Configure
git
to use the custom hooks directorygit config core.hooksPath .githooks
-
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.
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 usingnpm 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.
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}"