-
Notifications
You must be signed in to change notification settings - Fork 34
yeet gulp from build system (involves lots of chaos) #445
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
Open
BigSpaceships
wants to merge
28
commits into
develop
Choose a base branch
from
yeet-gulp
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
96feaf4
Revert dependabot stuff (sorry tyler arfcomm)
BigSpaceships fc3e043
webpack builds now
BigSpaceships a5ad2ef
build css
BigSpaceships d3adbcc
update dockerfile
BigSpaceships bc4192c
css with dockerfile in better way
BigSpaceships e0aa735
include fonts
BigSpaceships 886b095
removed most of the icons
BigSpaceships 9435402
removed gulp stuff :))))
BigSpaceships fb634a6
updated css stuff and removed more gulp things
BigSpaceships 18b47c5
made dockerfile nicer
BigSpaceships ae4250a
update node build action
BigSpaceships c106ed3
trying to fix gh action
BigSpaceships 58279ec
ugh more not working
BigSpaceships 62b9b51
removed action that wasn't working
BigSpaceships 21426b4
bumped node and removed gulp
BigSpaceships eb64671
update node and webpack a little bit
BigSpaceships d35ebbf
webpack 4
BigSpaceships da3d641
update lots of dependencies
BigSpaceships d5ef6a9
update webpack and use cli
BigSpaceships 2970831
fix build errors for exception stuff
BigSpaceships 55bdc46
build scss with webpack
BigSpaceships f5ba609
update some icons to be better
BigSpaceships 4289817
webpack does icons now
BigSpaceships 2591d09
webpack copies images too :)
BigSpaceships 6ec09cc
removed ball fall stuff (as far as i can tell it doesn't do anything)
BigSpaceships 587d488
gunicorn 22
BigSpaceships bae74a5
updated config.env.py to match env changes
BigSpaceships 15f9df3
fixed styling issues with attendance
BigSpaceships File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,22 @@ | ||
| FROM docker.io/python:3.12-bookworm | ||
| FROM node:25-bookworm-slim AS build-frontend | ||
|
|
||
| RUN mkdir /opt/conditional | ||
|
|
||
| WORKDIR /opt/conditional | ||
|
|
||
| RUN apt-get -yq update && \ | ||
| apt-get -yq install curl git | ||
|
|
||
| COPY package.json package-lock.json /opt/conditional/ | ||
|
|
||
| RUN npm ci | ||
|
|
||
| COPY build*.js webpack.config.js /opt/conditional | ||
| COPY frontend /opt/conditional/frontend | ||
|
|
||
| RUN npm run webpack | ||
|
|
||
| FROM docker.io/python:3.12-slim-bookworm | ||
| MAINTAINER Computer Science House <[email protected]> | ||
|
|
||
| RUN mkdir /opt/conditional | ||
|
|
@@ -12,21 +30,13 @@ RUN apt-get -yq update && \ | |
| pip install -r requirements.txt && \ | ||
| apt-get -yq clean all | ||
|
|
||
| ENV NVM_DIR /usr/local/nvm | ||
| ENV NODE_VERSION v10.24.1 | ||
| RUN mkdir -p $NVM_DIR | ||
|
|
||
| RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash | ||
| ARG PORT=8080 | ||
| ENV PORT=${PORT} | ||
| EXPOSE ${PORT} | ||
|
|
||
| RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION" | ||
|
|
||
| ADD . /opt/conditional | ||
|
|
||
| RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm use --delete-prefix $NODE_VERSION && npm install && npm run production" | ||
|
|
||
| RUN rm -rf node_modules && \ | ||
| apt-get -yq clean all | ||
| COPY . /opt/conditional | ||
| COPY --from=build-frontend /opt/conditional/conditional/static /opt/conditional/conditional/static | ||
|
|
||
| RUN ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime | ||
|
|
||
| CMD ["gunicorn", "conditional:app", "--bind=0.0.0.0:8080", "--access-logfile=-", "--timeout=256"] | ||
| CMD ["sh", "-c", "gunicorn conditional:app --bind=0.0.0.0:${PORT} --access-logfile=- --timeout=256"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| const { exec } = require('child_process'); | ||
| const path = require('path'); | ||
| const sass = require('sass'); | ||
| const fs = require('node:fs'); | ||
|
|
||
| // yes I know this is awkward. I want to actually use the node libraries but that gets SUBSTANTIALLY easier when node and all the dependinces are updated | ||
| // So after I can update node and stuff I'll change this to do it in a sane way, probably in webpack | ||
|
|
||
| const loadPaths = [ | ||
| "./node_modules/csh-material-bootstrap/dist", | ||
| "./node_modules/csh-material-bootstrap/dist/css", | ||
| "./node_modules/datatables.net-bs/css", | ||
| "./node_modules/bootstrap-material-datetimepicker/css", | ||
| "./node_modules/load-awesome/css", | ||
| "./node_modules/reveal.js/css", | ||
| "./node_modules", | ||
| ".", | ||
| ] | ||
|
|
||
| function compileFile(file) { | ||
| const result = sass.compile("frontend/stylesheets/" + file + ".scss", { | ||
| loadPaths: loadPaths, | ||
| importers: [ | ||
| new sass.NodePackageImporter() | ||
| ], | ||
| }) | ||
|
|
||
| fs.writeFileSync("conditional/static/css/" + file + ".css", result.css); | ||
| } | ||
|
|
||
| exec("mkdir -p " + path.resolve("conditional/static/css")) | ||
|
|
||
| compileFile("app") | ||
|
|
||
| compileFile("presentations") | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.