Skip to content

Commit 1fc1b38

Browse files
committed
Stop using bower
`bower` is maintained but not recommended for use by its developers. Our `bower.json` file now only includes two dependencies: `jquery` and `jquery-flot`. At this point, `bower` is not doing much to serve the project. This patch makes the following primary changes: - Remove `bower.json` - Remove `package.json`, which only included `bower` - Put the minified source files for `jquery` and `jquery-flot` directly in `static/js/lib/` - Remove the project directories for `jquery` and `jquery-flot`. The following smaller changes are also included: - Remove `Makefile` rules related to `bower` and `jquery-flot` - Update the "JavaScript libraries" section of the `README.rst` - Remove steps related to `package.json` from `Dockerfile`
1 parent 260bf7d commit 1fc1b38

File tree

129 files changed

+5
-46158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+5
-46158
lines changed

Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ RUN apt-get update \
4141
zlib1g-dev \
4242
&& rm -rf /var/lib/apt/lists/*
4343

44-
# install node dependencies
45-
COPY ./package.json ./package.json
46-
RUN npm install
47-
4844
# copy project
4945
COPY . .
5046

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.PHONY: all ci clean collectstatics compile-scss compile-scss-debug install run test watch-scss
22

33
APP_LIST ?= accounts aggregator blog contact dashboard djangoproject docs foundation fundraising legacy members releases svntogit tracdb
4-
JQUERY_FLOT=djangoproject/static/js/lib/jquery-flot
54
SCSS = djangoproject/scss
65
STATIC = djangoproject/static
76

@@ -27,13 +26,6 @@ isort:
2726
isort-check:
2827
python -m isort --check $(APP_LIST)
2928

30-
$(JQUERY_FLOT)/:
31-
npm run bower install
32-
33-
$(JQUERY_FLOT)/jquery.flot.min.js: $(JQUERY_FLOT)
34-
cat $(JQUERY_FLOT)/jquery.flot.js $(JQUERY_FLOT)/jquery.flot.time.js > $(JQUERY_FLOT)/jquery.flot.concat.js
35-
yuicompressor $(JQUERY_FLOT)/jquery.flot.concat.js -o $(JQUERY_FLOT)/jquery.flot.min.js
36-
3729
migrations-check:
3830
python -m manage makemigrations --check --dry-run
3931

README.rst

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -234,23 +234,9 @@ Check out the ``Procfile`` file for all the process names.
234234
JavaScript libraries
235235
--------------------
236236

237-
This project uses `Bower <https://bower.io/>`_ to manage JavaScript libraries.
238-
239-
At any time, you can run it to install a new library (e.g., ``jquery-ui``)::
240-
241-
npm run bower install jquery-ui --save
242-
243-
or check if there are newer versions of the libraries that we use::
244-
245-
npm run bower ls
246-
247-
If you need to update an existing library, the easiest way is to change the
248-
version requirement in ``bower.json`` and then to run
249-
``npm run bower install`` again.
250-
251-
We commit the libraries to the repository, so if you add, update, or remove a
252-
library from ``bower.json``, you will need to commit the changes in
253-
``djangoproject/static`` too.
237+
This project's JavaScript libraries can be found in
238+
``djangoproject/static/js/lib/``. If you need to add a library, commit the
239+
minified version of it to this directory.
254240

255241
Documentation search
256242
--------------------

bower.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

djangoproject/static/js/lib/jquery-flot/.bower.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

djangoproject/static/js/lib/jquery-flot/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

djangoproject/static/js/lib/jquery-flot/.travis.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)