Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
toddbirchard committed Oct 22, 2020
1 parent 7fdbffa commit 0eac4f4
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 44 deletions.
49 changes: 15 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,31 @@

Build and code-split your frontend assets across Blueprints using Flask-Assets. Accompanying tutorial on Hackers and Slackers here: https://hackersandslackers.com/flask-assets/

## Installation
# Getting Started

**Installation via `requirements.txt`**:
Get set up locally in two steps:

```shell
$ git clone https://github.com/hackersandslackers/fflask-assets-tutorial.git
$ cd flask-assets-tutorial
$ python3 -m venv myenv
$ source myenv/bin/activate
$ pip3 install -r requirements.txt
$ flask run
```

**Installation via [Pipenv](https://pipenv-fork.readthedocs.io/en/latest/)**:

```shell
$ git clone https://github.com/hackersandslackers/flask-assets-tutorial.git
$ cd flask-assets-tutorial
$ pipenv shell
$ pipenv update
$ flask run
```

**Installation via [Poetry](https://python-poetry.org/)**:

```shell
$ git clone https://github.com/hackersandslackers/flask-assets-tutorial.git
$ cd flask-assets-tutorial
$ poetry shell
$ poetry update
$ poetry run
```

## Usage
### Environment Variables

Replace the values in **.env.example** with your values and rename this file to **.env**:

* `FLASK_APP`: Entry point of your application (should be `wsgi.py`).
* `FLASK_ENV`: The environment to run your app in (either `development` or `production`).
* `FLASK_APP`: Entry point of your application; should be `wsgi.py`.
* `FLASK_ENV`: The environment in which run your application; either `development` or `production`.
* `SECRET_KEY`: Randomly generated string of characters used to encrypt your app's data.
* `LESS_BIN`: Path to your local LESS installation via `which lessc`.

*Remember never to commit secrets saved in .env files to Github.*

### Installation

Get up and running with `make deploy`:

```shell
$ git clone https://github.com/hackersandslackers/flask-assets-tutorial.git
$ cd flask-assets-tutorial
$ make deploy
```

-----

**Hackers and Slackers** tutorials are free of charge. If you found this tutorial helpful, a [small donation](https://www.buymeacoffee.com/hackersslackers) would be greatly appreciated to keep us in business. All proceeds go towards coffee, and all coffee goes towards more content.
163 changes: 162 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 14 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ readme = "README.md"
homepage = "https://hackersandslackers.com/flask-assets/"
repository = "https://github.com/hackersandslackers/flask-assets-tutorial/"
documentation = "https://hackersandslackers.com/flask-assets/"
keywords = ["Flask",
"Flask-Assets",
"Bundles",
"MVC",
"Tutorial"]
keywords = [
"Flask",
"Flask-Assets",
"Bundles",
"Frontend",
"Tutorial"
]

[tool.poetry.dependencies]
python = "^3.8"
Expand All @@ -26,13 +28,16 @@ python-dotenv = "*"

[tool.poetry.dev-dependencies]
pytest = "*"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
black = "^20.8b1"
isort = "^5.6.4"

[tool.poetry.scripts]
run = "wsgi:app"

[tool.poetry.urls]
issues = "https://github.com/hackersandslackers/flask-assets-tutorial/issues"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

Loading

0 comments on commit 0eac4f4

Please sign in to comment.