Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using bower #1830

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the only usage of npm in the Dockerfile right? I think that means we can drop the npm dependency above (L19)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. 👀

I checked the code and the same is true for the README.

You can remove the npm install in the README.rst (L3)
https://github.com/django/djangoproject.com/blob/main/README.rst?plain=1#L23

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed that! I pushed 4628411 for the npm references and noticed 147cd76 as well.


# 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
Loading