Add prefix for all commands in documentation (#2877)

* Add prefix for commands in docs

* Add prefix for commands in example's README
This commit is contained in:
Grey Li 2018-09-09 16:41:56 +08:00 committed by Hsiaoming Yang
parent b9b88b0cdf
commit 21b0aa6dd8
19 changed files with 112 additions and 112 deletions

View file

@ -14,32 +14,32 @@ you're reading.** You probably want the latest tagged version, but the
default Git version is the master branch. ::
# clone the repository
git clone https://github.com/pallets/flask
cd flask
$ git clone https://github.com/pallets/flask
$ cd flask
# checkout the correct version
git tag # shows the tagged versions
git checkout latest-tag-found-above
cd examples/tutorial
$ git tag # shows the tagged versions
$ git checkout latest-tag-found-above
$ cd examples/tutorial
Create a virtualenv and activate it::
python3 -m venv venv
. venv/bin/activate
$ python3 -m venv venv
$ . venv/bin/activate
Or on Windows cmd::
py -3 -m venv venv
venv\Scripts\activate.bat
$ py -3 -m venv venv
$ venv\Scripts\activate.bat
Install Flaskr::
pip install -e .
$ pip install -e .
Or if you are using the master branch, install Flask from source before
installing Flaskr::
pip install -e ../..
pip install -e .
$ pip install -e ../..
$ pip install -e .
Run
@ -47,17 +47,17 @@ Run
::
export FLASK_APP=flaskr
export FLASK_ENV=development
flask init-db
flask run
$ export FLASK_APP=flaskr
$ export FLASK_ENV=development
$ flask init-db
$ flask run
Or on Windows cmd::
set FLASK_APP=flaskr
set FLASK_ENV=development
flask init-db
flask run
> set FLASK_APP=flaskr
> set FLASK_ENV=development
> flask init-db
> flask run
Open http://127.0.0.1:5000 in a browser.
@ -67,11 +67,11 @@ Test
::
pip install '.[test]'
pytest
$ pip install '.[test]'
$ pytest
Run with coverage report::
coverage run -m pytest
coverage report
coverage html # open htmlcov/index.html in a browser
$ coverage run -m pytest
$ coverage report
$ coverage html # open htmlcov/index.html in a browser