-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust Asset Pipeline #73
Changes from all commits
7e4350f
3b1aa1e
00359e4
4361183
198abb2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
ruby 3.2.4 | ||
nodejs 20.15.1 | ||
yarn 1.22.22 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Challenge.Gov | ||
|
||
The Challenge.Gov Platform | ||
|
||
## Requirements | ||
|
||
* PostgreSQL 16+ | ||
* Ruby 3.2+ | ||
* Node.js 20.x | ||
* Yarn 1.22.x | ||
|
||
## Install and Setup | ||
|
||
Install PostgreSQL according to your OS of choice, for MacOS [Postgres.app](https://postgresapp.com/) is recommended. | ||
|
||
Install of the languages needed can be done via ASDF or Nix | ||
|
||
### ASDF Option | ||
|
||
To install Ruby and NodeJS it is recommended to use the [asdf version manager](https://asdf-vm.com/#/). Install instructions are copied here for MacOS, for other OSs see [asdf docs](https://asdf-vm.com/#/core-manage-asdf-vm). This also assumes you have [HomeBrew](https://brew.sh/) installed. | ||
|
||
```bash | ||
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.7.0 | ||
echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bash_profile | ||
echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bash_profile | ||
|
||
brew install \ | ||
coreutils automake autoconf openssl \ | ||
libyaml readline libxslt libtool unixodbc | ||
``` | ||
|
||
Once asdf is set up, install each language. NodeJS may require setting up keys, and should display help to guide you. | ||
|
||
```bash | ||
asdf plugin-add ruby | ||
asdf install ruby 3.2.4 | ||
|
||
asdf plugin-add nodejs | ||
bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring | ||
asdf install nodejs 20.15.1 | ||
|
||
asdf plugin-add yarn | ||
asdf install yarn 1.22.22 | ||
``` | ||
|
||
### Nix Shell Option | ||
|
||
Once on your machine, you need to install [the nix package manager](https://nixos.org/download.html#nix-install-macos) by following their multi-user installer. Once nix is installed, setup [direnv](https://direnv.net/) by hooking into your shell. This only has to be done on your machine once. | ||
|
||
```bash | ||
nix-env -f '<nixpkgs>' -iA direnv | ||
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc | ||
``` | ||
|
||
Once direnv is installed and your shell is restarted, clone the project and `cd` into it. You should see direnv warn about an untrusted `.envrc` file. Allow the file and finish installing dependencies and setting up the application. | ||
|
||
1. Allow direnv to use the envrc file `direnv allow` | ||
|
||
## Running Locally | ||
|
||
1. Install rubygems dependencies with `bundle install` | ||
1. Install nodejs dependencies `yarn install` | ||
1. Set up your uswds files in the build directory `npx gulp copyAssets` | ||
1. Setup the database `rake db:create`, note that postgres must be running for this to work | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need to note the shared DB with Phoenix here? if a user has their DB created and seeded on that repo, they don't need this step There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably, but I figured we'd see how things shake out and update this pretty often |
||
1. Boot the system, this will run the sass, esbuild, and uswds watchers along with the rails server | ||
1. `./bin/dev` | ||
|
||
Now you can visit [`localhost:3000`](http://localhost:3000) from your browser. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
web: env RUBY_DEBUG_OPEN=true bin/rails server | ||
css: yarn build:css --watch | ||
js: yarn build --watch | ||
uswds: npx gulp watch |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ig this is only relevant for sprockets? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, this saved me