Skip to content

Commit 1b36eec

Browse files
committed
Updated several README files.
- Legacy-Id: 9912
1 parent 9fa014f commit 1b36eec

3 files changed

Lines changed: 50 additions & 41 deletions

File tree

bootstrap/README-DATATRACKER.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ _______________________
44
Content
55
=======
66

7-
The files in this directory are modified versions of bootstrap v3.3.4. This is
7+
The files in this directory are modified versions of bootstrap_. This is
88
a cumbersome way to customize bootsrap, but as of the time of writing this
99
(03 Apr 2015), there seems to be no provision for including modifications
1010
within the distributed build environment without either editing files in
@@ -102,3 +102,4 @@ and more. Requires Jekyll. Usually only necessary if you're hacking on
102102
Bootstrap itself.
103103

104104

105+
.. _bootstrap: http://getbootstrap.com
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
Handling of External Javascript and CSS Components
22
==================================================
33

4-
This directory (``ietf/static/``) exists for the sole purpose of providing a
5-
visible location for ``ietf/static/bower.json``, a bower_ file which lists the
4+
The file ``bower.json`` in this direcory is a bower_ file which lists the
65
external web assets used by the datatracker.
76

8-
In order to update the version of a component listed in
9-
``ietf/static/bower.json``, or add a new one, you should edit ``bower.json``,
10-
and then run the management command::
7+
In order to update the version of a component listed in ``ietf/bower.json``,
8+
or add a new one, you should edit ``bower.json``, and then run the management
9+
command::
1110

1211
$ ietf/manage.py bower_install
1312

@@ -26,7 +25,9 @@ management command.)
2625
The ``bower_install`` command is not run automatically by ``bin/mkrelease``,
2726
since it needs an updated ``bower.json`` in order to do anything interesting;
2827
and we're not running ``bower update`` since some package releases break
29-
compatibility. So when you're intending to
30-
28+
compatibility. So when you're intending to update an external web asset to a
29+
newer version, you need to edit the ``bower.json`` file, run ``manage.py
30+
bower_install``, verify that the new version doesn't break things, and then
31+
commit the new files under ``static\lib\`` and the updated ``bower.json``.
3132

3233
.. _bower: http://bower.io/

static/README.rst

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
Handling of External Javascript and CSS Components
22
==================================================
33

4-
This directory (``static/``) holds a number of subdirectories, where one is handled
5-
differently than the rest: the ``lib/`` subdirectory holds distribution files for external
6-
client-side components, currently (18 Apr 2015) this means ``js`` and ``css`` components.
4+
This directory (``static/``) holds a number of subdirectories, where one is
5+
handled differently than the rest: the ``lib/`` subdirectory holds
6+
distribution files for external client-side components, currently (28 Jul
7+
2015) this means ``js`` and ``css`` components and fonts.
78

8-
These components each reside in their own subdirectory, which is named with the component
9-
name:
9+
These components each reside in their own subdirectory, which is named with
10+
the component name:
1011

1112
henrik@zinfandel $ ls -l static/lib
12-
total 44
13+
total 52
14+
drwxr-xr-x 5 henrik henrik 4096 Jul 26 08:55 admin
1315
drwxr-xr-x 6 henrik henrik 4096 Jul 25 15:25 bootstrap
1416
drwxr-xr-x 4 henrik henrik 4096 Jul 25 15:25 bootstrap-datepicker
17+
drwxr-xr-x 5 henrik henrik 4096 Jul 28 02:39 custom-bootstrap
1518
drwxr-xr-x 4 henrik henrik 4096 Jul 25 15:25 font-awesome
1619
drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 jquery
1720
drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 jquery.cookie
@@ -20,38 +23,42 @@ name:
2023
drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:24 ptserif
2124
drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 select2
2225
drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 select2-bootstrap-css
26+
drwxrwxrwx 3 henrik henrik 4096 Jul 27 11:42 static
2327

24-
If resources served over a CDN and/or with a high max-age don't have different URLs for
25-
different versions, then any component upgrade which is accompanied by a change in template
26-
functionality will be have a long transition time during which the new pages are served with
27-
old components, with possible breakage. We want to avoid this.
28+
If resources served over a CDN and/or with a high max-age don't have different
29+
URLs for different versions, then any component upgrade which is accompanied
30+
by a change in template functionality will be have a long transition time
31+
during which the new pages are served with old components, with possible
32+
breakage. We want to avoid this.
2833

29-
The intention is that after a release has been checked out, but before it is deployed,
30-
the whole static directory should be copied to a location which is accessible under the
31-
URL given by STATIC_URL -- in production mode this URL contains the datatracker release
32-
version, which will let the CDN serve the static files which correspond to the current
33-
release.
34+
The intention is that after a release has been checked out, but before it is
35+
deployed, the whole static directory should be symlinked or copied to a
36+
location which is accessible under the URL given by STATIC_URL -- in
37+
production mode this URL contains the datatracker release version, which will
38+
let the CDN serve the static files which correspond to the current release.
3439

35-
With the exception of the ``pt*`` fonts, all components under ``static/lib/`` are managed
36-
through a bower_ file; ``ietf/static/bower.json``. In order to install a new
37-
version of a component, you should update the ``bower.json`` file, and then run the management
38-
command::
40+
With the exception of the ``pt*`` fonts and ``custom-bootstrap``, the
41+
components under ``static/lib/`` are managed through a bower_ file;
42+
``ietf/bower.json``. In order to install a new version of a component, you
43+
should update the ``bower.json`` file, and then run the management command::
3944

4045
$ ietf/manage.py bower_install
4146

42-
That command will fetch the required version of each external component listed in
43-
``bower.json`` (actually, it will do this for *all* ``bower.json`` files found in the
44-
``static/`` directories of all ``INSTALLED_APPS``), saving them temporarily under
45-
``.tmp/bower_components/``; it will then extract the relevant ``js`` and ``css`` files and
46-
place them in an appropriately named directory under ``static/lib/``. The location
47-
used by ``bower_install`` is is controlled by ``COMPONENT_ROOT`` in ``settings.py``.
48-
49-
Any datatracker-specific static files which should be served by the CDN rather than
50-
directly by the datatracker web server should be moved from under ``static/ to ``ietf/static/``,
51-
so that they will be collected by the ``ietf/manage.py collectstatic`` command and
52-
placed under `static/lib/`` from where they will be made available to the CDN. Any
53-
template files referencing the files in question will need to be updated to use the
54-
``{% static 'foo/bar.jpg' %}`` notation to reference the files, so that the correct
55-
static url will be emitted.
47+
That command will fetch the required version of each external component listed
48+
in ``bower.json`` (actually, it will do this for *all* ``bower.json`` files
49+
found in all ``INSTALLED_APPS`` directories), saving them temporarily under
50+
``.tmp/bower_components/``; it will then extract the relevant ``js`` and
51+
``css`` files and place them in an appropriately named directory under
52+
``static/lib/``. The location used by ``bower_install`` is controlled by the
53+
``COMPONENT_ROOT`` setting in ``settings.py``.
54+
55+
Any datatracker-specific static files which should be served by the CDN rather
56+
than directly by the datatracker web server should be moved from under
57+
``static/`` to ``ietf/static/``, so that they will be collected by the
58+
``ietf/manage.py collectstatic`` command and placed under `static/lib/`` from
59+
where they will be made available to the CDN. Any template files referencing
60+
the files in question will need to be updated to use the ``{% static
61+
'foo/bar.jpg' %}`` notation to reference the files, so that the correct static
62+
url will be emitted both in production and development mode.
5663

5764
.. _bower: http://bower.io/

0 commit comments

Comments
 (0)