Skip to content

Commit

Permalink
Removed bower
Browse files Browse the repository at this point in the history
`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 is a redo of 98e20a0 which
was reverted because it led to errors in production when running
collectstatic.

Refs #1827
  • Loading branch information
adamzap authored Dec 17, 2024
1 parent 432f859 commit 86dbff9
Show file tree
Hide file tree
Showing 130 changed files with 5 additions and 46,164 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@ locale/*/LC_MESSAGES/django.mo
.envrc
.tox
djangoproject/cache
djangoproject/static/js/lib/jquery-flot/examples
djangoproject/static/css/*.map
djangoproject/static/css/*.css
node_modules/
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN apt-get update \
libpq5 \
make \
netcat-openbsd \
npm \
postgresql-client-15 \
rsync \
zlib1g \
Expand All @@ -41,10 +40,6 @@ RUN apt-get update \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

# install node dependencies
COPY ./package.json ./package.json
RUN npm install

# copy project
COPY . .

Expand Down
9 changes: 0 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.PHONY: all ci clean collectstatics compile-scss compile-scss-debug install run test watch-scss

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

Expand All @@ -19,21 +18,13 @@ compile-scss-debug:

install:
python -m pip install --requirement requirements/dev.txt
npm install

isort:
python -m isort $(APP_LIST)

isort-check:
python -m isort --check $(APP_LIST)

$(JQUERY_FLOT)/:
npm run bower install

$(JQUERY_FLOT)/jquery.flot.min.js: $(JQUERY_FLOT)
cat $(JQUERY_FLOT)/jquery.flot.js $(JQUERY_FLOT)/jquery.flot.time.js > $(JQUERY_FLOT)/jquery.flot.concat.js
yuicompressor $(JQUERY_FLOT)/jquery.flot.concat.js -o $(JQUERY_FLOT)/jquery.flot.min.js

migrations-check:
python -m manage makemigrations --check --dry-run

Expand Down
21 changes: 3 additions & 18 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Install and run locally from a virtual environment
#. Install dependencies::

python3 -m pip install -r requirements/dev.txt
npm install

Alternatively, use the make task::

Expand Down Expand Up @@ -234,23 +233,9 @@ Check out the ``Procfile`` file for all the process names.
JavaScript libraries
--------------------

This project uses `Bower <https://bower.io/>`_ to manage JavaScript libraries.

At any time, you can run it to install a new library (e.g., ``jquery-ui``)::

npm run bower install jquery-ui --save

or check if there are newer versions of the libraries that we use::

npm run bower ls

If you need to update an existing library, the easiest way is to change the
version requirement in ``bower.json`` and then to run
``npm run bower install`` again.

We commit the libraries to the repository, so if you add, update, or remove a
library from ``bower.json``, you will need to commit the changes in
``djangoproject/static`` too.
This project's JavaScript libraries can be found in
``djangoproject/static/js/lib/``. If you need to add a library, commit the
minified version of it to this directory.

Documentation search
--------------------
Expand Down
8 changes: 0 additions & 8 deletions bower.json

This file was deleted.

18 changes: 0 additions & 18 deletions djangoproject/static/js/lib/jquery-flot/.bower.json

This file was deleted.

3 changes: 0 additions & 3 deletions djangoproject/static/js/lib/jquery-flot/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions djangoproject/static/js/lib/jquery-flot/.travis.yml

This file was deleted.

Loading

0 comments on commit 86dbff9

Please sign in to comment.