Skip to content

Commit

Permalink
Improve the dependency management for javascript dependencies
Browse files Browse the repository at this point in the history
This commit will add npm for dependency management of javascript dependencies.
Most of the static folder was restructured.

Unfortunately this updates some of the packages to newer versions, which needs
templates adjusted. Because of this Bootstrap 3 -> Bootstrap 5 migration is part
of this commit.

As part of the Bootstrap migration there is a cleanup of unused templates.

It also updates documentation to reflect this new change and updates both dev
environments to use the npm installed packages.

Closes fedora-infra#1504

Signed-off-by: Michal Konečný <[email protected]>
  • Loading branch information
Zlopez committed Dec 5, 2022
1 parent 3fb7dd7 commit 8f4da85
Show file tree
Hide file tree
Showing 61 changed files with 1,287 additions and 17,373 deletions.
55 changes: 33 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,48 @@
# Python
*.pyc
build/
dist/
docs/_build/
docs/docblocks/
*egg-info/
*eggs/
*.cfg
!mypy.cfg
*.sqlite
*~
*.swp
*.swo
start-pkgdb
.cache/
.coverage
cnucnu/
*.egg
anitya-env
.tox
.idea/
.vagrant/
*.retry
anitya.db
client_secrets.json
oidc_credentials.json
anitya/static/docs/
.pytest_cache/
coverage.xml
htmlcov
pip-wheel-metadata/
venv/
.venv/

# Docs
anitya/static/docs/
docs/_build/
docs/docblocks/

# Anitya
anitya.db
*.sqlite
*.cfg

# Tests
coverage.xml
htmlcov
.pytest_cache/
.tox
.coverage
!mypy.cfg

# IDE related files
.vscode/
.idea/
*~
*.swp
*.swo

# Vagrant dev environment
.vagrant/

# Container dev environment
.container/postgresql/*
.container/dump/*
!.container/postgresql/.gitkeep

# Javascript
anitya/static/node_modules/
6 changes: 6 additions & 0 deletions Containerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ RUN dnf install -y python3 python3-devel python3-psycopg2 poetry
# Dependencies for tox
RUN dnf install -y git python3-tox libpq libpq-devel gcc graphviz

# Install npm to manage javascript dependencies
RUN dnf install -y npm

RUN dnf autoremove -y && dnf clean all -y

COPY anitya ./anitya
Expand All @@ -27,6 +30,9 @@ RUN cp /app/ansible/roles/anitya-dev/files/anitya.toml /etc/anitya
RUN mkdir -p /etc/fedora-messaging
RUN cp /app/.container/web/config.toml /etc/fedora-messaging

# Download javascript dependencies
RUN pushd anitya/static && npm install && popd

# Poetry installation
RUN poetry build
RUN pip install dist/*.whl
Expand Down
1 change: 0 additions & 1 deletion anitya/static/bootstrap

This file was deleted.

Loading

0 comments on commit 8f4da85

Please sign in to comment.