Skip to content

Commit

Permalink
[skip ci] Update Readme so information about preferred clone process …
Browse files Browse the repository at this point in the history
…is up front
  • Loading branch information
mgriffin-scottlogic committed Jun 19, 2024
1 parent 6aabe77 commit a026834
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit a026834

Please sign in to comment.