-
-
Notifications
You must be signed in to change notification settings - Fork 965
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
Stop using bower
#1830
Conversation
`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`
358b864
to
1fc1b38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great (as usual), I just found one thing that I think can be cleaned up further.
@@ -41,10 +41,6 @@ RUN apt-get update \ | |||
zlib1g-dev \ | |||
&& rm -rf /var/lib/apt/lists/* | |||
|
|||
# install node dependencies | |||
COPY ./package.json ./package.json | |||
RUN npm install |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent 👍🏻
Had to revert this because it failed on deploy while doing The issue is the line Either we should delete the line, or re-add the |
Oh wow, ok. Do you want me to delete the line and push to this branch or a new branch? |
I'm fine with either. Can a PR be reopened after it's been merged? (Also I opened a new issue to try and prevent this type of issue from happening in the future: #1831 ) |
I don't think I can re-open this PR. I'll open a new one. |
bower
is maintained but not recommended for use by its developers. Ourbower.json
file now only includes two dependencies:jquery
andjquery-flot
. At this point,bower
is not doing much to serve the project.This patch makes the following primary changes:
bower.json
package.json
, which only includedbower
jquery
andjquery-flot
directly instatic/js/lib/
jquery
andjquery-flot
.The following smaller changes are also included:
Makefile
rules related tobower
andjquery-flot
README.rst
package.json
fromDockerfile
Part of #1827