Setting up Habitica Locally on Windows

===Configure Line Ending Conversions in Git===
right|thumb|300px|Configuring the line ending conversions Depending on how you installed Git, you may see a "Configuring the line ending conversions" window, similar to the screenshot shown here. It is important to select "Checkout as-is, commit Unix-style line endings".
Alternatively, after you have finished installing Git, you can configure that setting from the command line by running the git config command below. If you see an error about the git program not being found, move on to the "Putting Git in your PATH Variable" section below and then return here to run this comamnd.git config --global core.autocrlf input
Configuring line endings is necessary because Windows handles line endings differently than other operating systems. It uses a combination of a carriage return and line feed, \r\n (CRLF), while Unix/Linux/MacOS systems use only the line feed (LF) character \n. To force Windows to be compatible, you must set up Git to ensure that only LF line endings are committed to Habitica's GitHub repository.
For further information on line endings and whitespace in Git, see the "Formatting and Whitespace" section in the Pro Git book.
If you don't want to set the core.autocrlf setting globally, see Dealing with line endings > Per-repository settings to learn how to set it for individual repositories. This will only be relevant to you if you are already using Git for other projects or will be using it for others in future. Despite what that page says, you should not commit the .gitattributes file as we do not need it in Habitica's repo for all developers.
===Putting Git in your PATH Variable===
The folder in which the Git program was installed must be added to your PATH environment variable. Depending on how you installed Git, that may have been done automatically or the Git installer may have given you an option to do it. If neither of those happened, you will need to do it manually after installation using the steps below.
To test whether Git is in your path, open a Windows command prompt and type git --help then press Enter. If you see a list of available Git commands then Git is already in the PATH variable and you do not need to add it manually. If you see an error message or no output from that command, follow the steps below.
# Find the folder where the Git executable file was placed during installation.
#* If you are unsure where Git is located, the default installation often adds it to the Start Menu. Find it there, right click on it, and select "Open file location."
#* If doing so results in shortcuts to Git rather than the actual file location, select a shortcut, right click, and select "Open file location."
# Search the internet to find reliable documentation about how to modify the PATH variable in your version of Windows (sample steps are given below for Windows 10).
# Add the folder containing the Git program to your PATH variable.
# Check that Git is now in your path using the test described above. If the git --help command still does not work, you may not have added the correct folder.
====Setting the PATH on Windows 10====
#Go to the Control Panel (aka Windows Settings), type "environment variables" into the search field.
#Select "Edit the System Environment Variables", and then click the "Environment Variables" button at the bottom of the "System Properties" dialog box. 
#Select Path, click Edit, and then add the path for Git to a new line. The default installation path is likely to be C:\Program Files\Git\bin or %USERPROFILE%\AppData\Local\Programs\Git\bin (for example, Michael Antonacci\AppData\Local\Programs\Git\bin) or C:\Users\... but confirm that on your own PC using the instructions above. 
#Click OK to save the path addition.
#Test that the path was modified correctly as described above.
==Install Build Tools==
Install the Visual C++ 2015 build tools.
This step might not be necessary but recent contributors using Windows installs have indicated that it might be needed for some of Habitica's dependencies to be installed (e.g., bcrypt). If you have feedback about this, please post to the Aspiring Blacksmith's guild.'
If you set up Habitica on Windows without installing the build tools and you find that your local install runs without errors, please tell us in the guild.
==Install Node and NPM==
This section takes you through the process of installing node and npm.
Note that the sample command below is for reference only and might not contain the correct version of npm so be sure to adjust the command as needed before you run it. The versions that must be used are 
#Download and run the latest Node.js msi installation file.
#Launch a command window as Administrator and in that window:
##Check that you installed node successfully and that it is the correct version (if it is not, redo the node installation using the correct download):node -v
##Installing NodeJS also installs npm. Check that that has been done and that the version is correct:npm -v
##*If the version of npm is wrong, install the correct version. For example, if npm 6 needed to be installed:npm install -g npm@6
Note: 
You may need to add C:\Program Files\nodejs;C:\Program Files\nodejs\node_modules\npm\bin to your PATH variable for node to work from the command-line.
Install some dependencies necessary for the bcrypt package:npm install -g node-gypnpm install -g --production windows-build-tools
If you later experience errors with bcrypt, you might need to install some extra dependencies listed here: https://github.com/kelektiv/node.bcrypt.js#dependencies . If you have any feedback about that, or experience problems with it, please post to the Aspiring Blacksmiths guild so that we can improve this documentation.
Create a directory by executing mkdir website\buildIf it gives you an error that the directory already exists, ignore the error and proceed with the next step
Close any applications or file explorer windows that might be reading your local copy of the repository. The installation steps below might fail if any of the files are locked by any Windows processes. For antivirus software, make an exception in its settings so that it won't scan the repository until the install is complete. For reference, see from this GitHub comment to the end of the issue.
zh:在Windows本地搭建Habitica
Category:Contributing
Category:Pages with files missing alt tags