mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-22 09:41:26 -08:00
Update install steps (#359)
* Update INSTALLATION.md Update INSTALLATION with more narrative text on how to install and start running parts of the app. We will need to update this soon with more info about the repo organization (once we have a `data` directory), but for now this reflects the current state of the repo. * Update docs Move client-specific things to client README, and update client README with steps to get the clientside app running locally.
This commit is contained in:
parent
d10f2ae0c9
commit
5600443f1a
3 changed files with 64 additions and 21 deletions
|
@ -3,7 +3,7 @@
|
|||
*[Read this in English](INSTALLATION.md)*
|
||||
|
||||
## Software requerido
|
||||
- git, node, yarn and an IDE
|
||||
- git, node, and an IDE
|
||||
|
||||
### Instalar Git
|
||||
|
||||
|
@ -28,20 +28,12 @@ Descargar desde [sitio web](https://git-scm.com/download/win)
|
|||
|
||||
Esto funcionará tanto para MacOS como para Win10. Siga las instrucciones de este [enlace](https://medium.com/@nodesource/installing-node-js-tutorial-using-nvm-5c6ff5925dd8)
|
||||
|
||||
### Instalar Yarn
|
||||
- Esto es para MacOS y Win10
|
||||
- Tenga en cuenta que si bien esta aplicación usa npm como administrador de paquetes, se requiere hilo para construir el [uswds](https://github.com/uswds/uswds) library.
|
||||
|
||||
Abra la terminal y escriba `sudo npm install -global yarn` y presione RETORNO.
|
||||
1. Escribe "yarn -v" y pulsa RETORNO.
|
||||
2. Verifique que se muestre un número de versión
|
||||
|
||||
### Configuración de IDE
|
||||
Si bien se puede usar cualquier IDE, describimos cómo configurar VS Code
|
||||
|
||||
1. Abra la terminal y escriba `brew install --cask visual-studio-code` y presione RETORNO.
|
||||
1. Si esto no funciona o para Win10, puede descargar VS Code desde el [sitio web](https://code.visualstudio.com/).
|
||||
2. Después de [bifurcar este repositorio](https://github.com/usds/justice40-tool/blob/main/CONTRIBUTING.md#code-contributions), puede clonar su repositorio bifurcado en VS Code
|
||||
2. Después de [bifurcar este repositorio](https://github.com/usds/justice40-tool/blob/main/CONTRIBUTING-es.md#colaboraciones-con-c%C3%B3digo), puede clonar su repositorio bifurcado en VS Code
|
||||
3. VS Code con el mensaje de "clonar un repositorio"
|
||||
4. Abra la terminal y navegue al directorio `cliente`
|
||||
5. Escriba `npm install` para cargar las dependencias
|
||||
|
@ -55,3 +47,14 @@ Si bien se puede usar cualquier IDE, describimos cómo configurar VS Code
|
|||
3. [Live Share](https://github.com/MicrosoftDocs/live-share)
|
||||
4. [Live Share Audio](https://github.com/MicrosoftDocs/live-share)
|
||||
5. [Live Share Extention Pack](https://github.com/MicrosoftDocs/live-share)
|
||||
|
||||
## Ejecuta el código
|
||||
|
||||
1. Bifurcar este repositorio y crear un clon local. [Más información](https://docs.github.com/es/github/getting-started-with-github/quickstart/fork-a-repo)
|
||||
1. Si está usando una Mac y Homebrew, abra la terminal y escriba `brew update` y `brew doctor`.
|
||||
|
||||
Para el desarrollo de front-end, lea el [Client README](client/README.md).
|
||||
|
||||
Para el desorrollo de back-end, lea el [Score README](score/README.md).
|
||||
|
||||
Para la implementación de software, lea el [Infrastructure README](infrastructure/README.md).
|
|
@ -3,7 +3,9 @@
|
|||
*[¡Lea esto en español!](INSTALLATION-es.md)*
|
||||
|
||||
## Required Software
|
||||
- git, node, yarn and an IDE
|
||||
You'll need the following set up in your environment before continuing to run the Justice40 Tool code.
|
||||
|
||||
- git, node, and an IDE
|
||||
|
||||
### Install Git
|
||||
|
||||
|
@ -18,24 +20,22 @@ Download from [website](https://git-scm.com/download/win)
|
|||
|
||||
|
||||
### Install Homebrew (MacOS only)
|
||||
1. Open the terminal and copy / paste this command and hit RETURN.
|
||||
Homebrew is an easy way to manage software downloads on MacOS. You don't *have* to use it, but we recommend it.
|
||||
|
||||
`/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"`
|
||||
1. First, open your terminal and run `brew -v` to determine whether you have Homebrew installed. If you get a resopnse that looks something like `Homebrew 3.1.9`, you've already got it! If you get nothing back, or an error, continue.
|
||||
2. Open the terminal and copy / paste this command and hit RETURN. Go through the prompts (you will need to grant `sudo` access).
|
||||
|
||||
`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"`
|
||||
|
||||
2. Validate installation by typing `brew -v` in the terminal and ensure a version number is shown.
|
||||
|
||||
### Install Node using NVM
|
||||
|
||||
This will work for both MacOS and Win10. Follow instructions on this [link](https://medium.com/@nodesource/installing-node-js-tutorial-using-nvm-5c6ff5925dd8)
|
||||
This will work for both MacOS and Win10. Follow instructions on this [link](https://medium.com/@nodesource/installing-node-js-tutorial-using-nvm-5c6ff5925dd8). Be sure to read through the whole doc to find the sections within each step relevant to you (e.g. if you're using Homebrew, when you get to Step 2 look for the section, "Install NVM with Homebrew").
|
||||
|
||||
If you install NVM using Homebrew, make sure to read the output in terminal after you run `brew install nvm`. You will need to add a few lines to your ~/.bash_profile and perhaps complete a couple other tasks.
|
||||
|
||||
### Install Yarn
|
||||
- This is for both MacOS and Win10
|
||||
- Note that while this app uses npm as the package manager, yarn is required to build the [uswds](https://github.com/uswds/uswds) library.
|
||||
|
||||
Open the terminal and type `sudo npm install -global yarn` and hit RETURN.
|
||||
1. Type `yarn -v` and hit RETURN
|
||||
2. Verify a version number is shown
|
||||
Once you install NVM, don't forget to install Node! This is included in the linked tutorial above.
|
||||
|
||||
### IDE set up
|
||||
While any IDE can be used, we're outlining how to set up VS Code
|
||||
|
@ -56,3 +56,29 @@ While any IDE can be used, we're outlining how to set up VS Code
|
|||
3. [Live Share](https://github.com/MicrosoftDocs/live-share)
|
||||
4. [Live Share Audio](https://github.com/MicrosoftDocs/live-share)
|
||||
5. [Live Share Extention Pack](https://github.com/MicrosoftDocs/live-share)
|
||||
|
||||
|
||||
## Running the code
|
||||
|
||||
Once you have the required software installed and ready on your computer, you're ready to begin installing and running the Justice40 Tool code.
|
||||
|
||||
1. Fork this repository and create a clone locally. In your terminal/CLI, in the directory you wish to put this project, run `git clone` plus the URL of your fork.
|
||||
1. If you're using a Mac and Homebrew, go ahead and run `brew update` and `brew doctor`. It's always good to run these regularly to make sure your packages are up to date and in good condition.
|
||||
|
||||
Now, check out the next section on the organization of this repository to determine where to go next.
|
||||
|
||||
### Repo organization
|
||||
Our repo is organized into multiple directories (folders) to make it easier to work on and run different parts of the system independently.
|
||||
|
||||
The top level of the repo contains these directories, as well as project-wide documentation such as this INSTALLATION file, the README, LICENSE, CODE OF CONDUCT, etc.
|
||||
|
||||
There is also a docker-compose file that will eventually include everything you need to run every part of the application in one docker command; however, at the moment, this file only spins up the score creation part of our data pipeline.
|
||||
|
||||
**Running the client**
|
||||
If you wish to check out our client-side code (i.e. the GatsbyJS statically generated website with the map), check out the `client` directory and its [README](client/README.md).
|
||||
|
||||
**Running the backend**
|
||||
If you want to run the data pipeline with ETL and score generation, check out the `score` directory and its [README](score/README.md).
|
||||
|
||||
**Deployment**
|
||||
For core team contributors working on deployment, check out the `infrastructure` directory and its [README](infrastructure/README.md) for information on deploying the backend to AWS.
|
||||
|
|
|
@ -1,5 +1,19 @@
|
|||
# Justice40 Client
|
||||
|
||||
## Installing and running the client site
|
||||
|
||||
1. Confirm you have the base required software installed. See [INSTALLATION](INSTALLATION.md) for more details.
|
||||
1. Install yarn if you do not have it yet. Open your terminal and run `sudo npm install -global yarn`. This works on MacOS and Win10. To confirm it is installed, run `yarn -v`. A version number should be returned.
|
||||
1. Navigate to the base directory of this repository, and go to the `client` directory (`cd client`).
|
||||
1. Run the command `npm install` to install the dependencies.
|
||||
1. Run `npm start` to start up the client app.
|
||||
1. Open your browser and navigate to http://localhost:8000
|
||||
|
||||
*Note that while this app uses npm as the package manager, yarn is required to build the [uswds](https://github.com/uswds/uswds) library.*
|
||||
|
||||
### Viewing data on the map
|
||||
TODO
|
||||
|
||||
## Linting and Formatting
|
||||
|
||||
This project uses [ESLint](https://eslint.org/) for code linting and [Prettier](https://prettier.io/) for formatting. They are integrated via [gatsby-plugin-prettier-eslint](https://www.gatsbyjs.com/plugins/gatsby-plugin-prettier-eslint/).
|
||||
|
|
Loading…
Add table
Reference in a new issue