diff --git a/README.md b/README.md index 467aa4f1..fb90b84b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,16 @@ The tech carbon estimator is a web component that allow you to estimate, at high level, your carbon emissions +## Cloning the project + +When cloning the project on a Windows machine, it is recommended to add the following option: + +``` +git clone REPOSITORY_URL --config core.autocrlf=input +``` + +For more information on why this is necessary, see the section on [Line Endings](#line-endings) + ## Using component exposed as a web component `tech-carbon-estimator`. The component takes the follow optional input: @@ -52,7 +62,7 @@ To get more help on the Angular CLI use `ng help` or go check out the [Angular C ## Line endings -This project is configured to use Linux/macOS line endings (Line Feed or LF), which will be enforced by prettier. If working on Windows, your editor should be configured to insert these kind of line endings (the default for VSCode using the repo settings). To prevent git from attempting to change line endings when pulling down changes you should set the following config option: +This project is configured to use Linux/macOS line endings (Line Feed or LF), which will be enforced by Prettier. If working on Windows, your editor should be configured to insert these kind of line endings (the default for VSCode using the repo settings). To prevent git from attempting to change line endings when pulling down changes you should set the following config option: ``` git config core.autocrlf input @@ -64,7 +74,7 @@ This option can also be set when cloning the repository by running: git clone REPOSITORY_URL --config core.autocrlf=input ``` -Applying the setting when cloning rather than after cloning may help resolve issues related to line endings when setting up the project in VSCode. +Applying the setting when cloning rather than after cloning may help resolve issues related to line endings when setting up the project in VSCode. Otherwise the default behaviour of git is to convert the line endings to the Windows standard of CRLF as you pull down the code and convert them back again on push. As Prettier can only use one standard, this then results in every line ending in the project being marked as an error within VSCode. ## Documentation