Merge pull request #7 from dod-ccpo/scripts_to_rule
First pass at Scripts to Rule Them All
This commit is contained in:
commit
763edd9ebe
12
README.md
12
README.md
@ -5,13 +5,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
brew install python3
|
||||
python3 -m venv .venv
|
||||
. .venv/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
npm install
|
||||
gem install sass
|
||||
./script/setup
|
||||
|
||||
## Running (development)
|
||||
|
||||
@ -23,6 +17,10 @@ To start the app and watch for changes:
|
||||
|
||||
To run unit tests:
|
||||
|
||||
./script/test
|
||||
|
||||
or
|
||||
|
||||
python -m pytest
|
||||
|
||||
or
|
||||
|
13
script/bootstrap
Executable file
13
script/bootstrap
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# If a command fails, exit the script
|
||||
set -e
|
||||
|
||||
# Ensure we are in the app root directory (not the /script directory)
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Install Python dependencies
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Install uswds node module and dependencies
|
||||
npm install
|
10
script/server
Executable file
10
script/server
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# If a command fails, exit the script
|
||||
set -e
|
||||
|
||||
# Ensure we are in the app root directory (not the /script directory)
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Launch the app
|
||||
python3 app.py
|
26
script/setup
Executable file
26
script/setup
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# If a command fails, exit the script
|
||||
set -e
|
||||
|
||||
# Ensure we are in the app root directory (not the /script directory)
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Install virtualenv
|
||||
pip install virtualenv
|
||||
|
||||
# Create and activate virtual environment
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
|
||||
# Install/update pip
|
||||
pip install --upgrade pip
|
||||
|
||||
# Update npm
|
||||
npm install -g npm
|
||||
|
||||
# Install application dependencies
|
||||
script/bootstrap
|
||||
|
||||
# Symlink uswds fonts into the /static directory
|
||||
ln -s ../node_modules/uswds/src/fonts ./static/fonts
|
10
script/test
Executable file
10
script/test
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# If a command fails, exit the script
|
||||
set -e
|
||||
|
||||
# Ensure we are in the app root directory (not the /script directory)
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Run unit tests
|
||||
python3 -m pytest
|
10
script/update
Executable file
10
script/update
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# If a command fails, exit the script
|
||||
set -e
|
||||
|
||||
# Ensure we are in the app root directory (not the /script directory)
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Update dependencies
|
||||
script/bootstrap
|
Loading…
x
Reference in New Issue
Block a user