Skip to content

Commit 0bdbd03

Browse files
authored
Merge pull request #312 from pmsoltani/pmsoltani-patch-1
Minor grammatical improvements
2 parents 58e19c0 + 47551f8 commit 0bdbd03

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

docs/frameworks/flask.rst

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Using with Flask
22
================
33

4-
This guide explains how to use libsass with Flask_ web framework.
4+
This guide explains how to use libsass with the Flask_ web framework.
55
:mod:`sassutils` package provides several tools that can be integrated
6-
to web applications written in Flask.
6+
into web applications written in Flask.
77

88
.. _Flask: http://flask.pocoo.org/
99

@@ -35,31 +35,31 @@ Defining manifest
3535
-----------------
3636

3737
The :mod:`sassutils` defines a concept named :dfn:`manifest`.
38-
Manifest is building settings of Sass/SCSS. It specifies some paths
38+
Manifest is the build settings of Sass/SCSS. It specifies some paths
3939
related to building Sass/SCSS:
4040

4141
- The path of the directory which contains Sass/SCSS source files.
42-
- The path of the directory compiled CSS files will go.
43-
- The path, is exposed to HTTP (through WSGI), of the directory that
44-
will contain compiled CSS files.
42+
- The path of the directory which the compiled CSS files will go.
43+
- The path, exposed to HTTP (through WSGI), of the directory that
44+
will contain the compiled CSS files.
4545

46-
Every package may have their own manifest. Paths have to be relative
46+
Every package may have its own manifest. Paths have to be relative
4747
to the path of the package.
4848

49-
For example, in the project the package name is :mod:`myapp`.
50-
The path of the package is :file:`myapp/`. The path of Sass/SCSS directory
51-
is :file:`static/sass/` (relative to the package directory).
52-
The path of CSS directory is :file:`static/css/`.
49+
For example, in the above project, the package name is :mod:`myapp`.
50+
The path of the package is :file:`myapp/`. The path of the Sass/SCSS
51+
directory is :file:`static/sass/` (relative to the package directory).
52+
The path of the CSS directory is :file:`static/css/`.
5353
The exposed path is :file:`/static/css`.
5454

55-
This settings can be represented as the following manifests::
55+
These settings can be represented as the following manifests::
5656

5757
{
5858
'myapp': ('static/sass', 'static/css', '/static/css')
5959
}
6060

61-
As you can see the above, the set of manifests are represented in dictionary.
62-
Keys are packages names. Values are tuples of paths.
61+
As you can see the above, the set of manifests are represented in dictionary,
62+
in which the keys are packages names and the values are tuples of paths.
6363

6464

6565
Building Sass/SCSS for each request
@@ -72,21 +72,21 @@ Building Sass/SCSS for each request
7272
Flask.
7373

7474
Flask --- :ref:`flask:app-dispatch`
75-
The documentation which explains how Flask dispatch each
75+
The documentation which explains how Flask dispatches each
7676
request internally.
7777

7878
__ http://flask.pocoo.org/docs/quickstart/#hooking-in-wsgi-middlewares
7979

80-
In development, to manually build Sass/SCSS files for each change is
81-
so tiring. :class:`~sassutils.wsgi.SassMiddleware` makes the web
82-
application to automatically build Sass/SCSS files for each request.
80+
In development, manually building Sass/SCSS files for each change is
81+
a tedious task. :class:`~sassutils.wsgi.SassMiddleware` makes the web
82+
application build Sass/SCSS files for each request automatically.
8383
It's a WSGI middleware, so it can be plugged into the web app written in
8484
Flask.
8585

8686
:class:`~sassutils.wsgi.SassMiddleware` takes two required parameters:
8787

8888
- The WSGI-compliant callable object.
89-
- The set of manifests represented as dictionary.
89+
- The set of manifests represented as a dictionary.
9090

9191
So::
9292

@@ -99,8 +99,8 @@ So::
9999
'myapp': ('static/sass', 'static/css', '/static/css')
100100
})
101101

102-
And then, if you want to link a compiled CSS file, use :func:`~flask.url_for()`
103-
function:
102+
And then, if you want to link a compiled CSS file, use the
103+
:func:`~flask.url_for()` function:
104104

105105
.. sourcecode:: html+jinja
106106

@@ -125,10 +125,10 @@ Building Sass/SCSS for each deployment
125125
Flask --- :ref:`flask:distribute-deployment`
126126
How to deploy Flask application using setuptools_.
127127

128-
If libsass has been installed in the :file:`site-packages` (for example,
129-
your virtualenv), :file:`setup.py` script also gets had new command
128+
If libsass is installed in the :file:`site-packages` (for example,
129+
your virtualenv), the :file:`setup.py` script also gets a new command
130130
provided by libsass: :class:`~sassutils.distutils.build_sass`.
131-
The command is aware of ``sass_manifests`` option of :file:`setup.py` and
131+
The command is aware of the ``sass_manifests`` option of :file:`setup.py` and
132132
builds all Sass/SCSS sources according to the manifests.
133133

134134
Add these arguments to :file:`setup.py` script::
@@ -141,35 +141,35 @@ Add these arguments to :file:`setup.py` script::
141141
}
142142
)
143143

144-
The ``setup_requires`` option makes sure that the libsass is installed
144+
The ``setup_requires`` option makes sure that libsass is installed
145145
in :file:`site-packages` (for example, your virtualenv) before
146-
:file:`setup.py` script. That means: if you run :file:`setup.py` script
147-
and libsass isn't installed yet at the moment, it will automatically
146+
the :file:`setup.py` script. That means if you run the :file:`setup.py`
147+
script and libsass isn't installed in advance, it will automatically
148148
install libsass first.
149149

150150
The ``sass_manifests`` specifies the manifests for libsass.
151151

152152
Now :program:`setup.py build_sass` will compile all Sass/SCSS files
153-
in the specified path and generates compiled CSS files into the specified
153+
in the specified path and generates compiled CSS files inside the specified
154154
path (according to the manifests).
155155

156-
If you use it with ``sdist`` or ``bdist`` command, a packed archive also
157-
will contain compiled CSS files!
156+
If you use it with ``sdist`` or ``bdist`` commands, the packed archive will
157+
also contain the compiled CSS files!
158158

159159
.. sourcecode:: console
160160

161161
$ python setup.py build_sass sdist
162162

163-
You can add aliases to make these commands to always run ``build_sass``
164-
command before. Make :file:`setup.cfg` config:
163+
You can add aliases to make these commands always run the ``build_sass``
164+
command first. Make :file:`setup.cfg` config:
165165

166166
.. sourcecode:: ini
167167

168168
[aliases]
169169
sdist = build_sass sdist
170170
bdist = build_sass bdist
171171

172-
Now it automatically builds Sass/SCSS sources and include compiled CSS files
172+
Now it automatically builds Sass/SCSS sources and include the compiled CSS files
173173
to the package archive when you run :program:`setup.py sdist`.
174174

175175
.. _setuptools: https://pypi.org/pypi/setuptools/

0 commit comments

Comments
 (0)