Skip to content

Commit

Permalink
Move all JS stuff to frontend directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
mblayman committed Oct 14, 2024
1 parent 15bc84a commit 34ef945
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ FROM node:18 AS nodejs

WORKDIR /app

COPY package.json package-lock.json ./
COPY frontend/package.json frontend/package-lock.json ./

RUN --mount=type=cache,target=/root/.npm \
npm install --loglevel verbose

COPY frontend frontend/
COPY templates templates/

RUN npm run build
RUN npm --prefix frontend run build

FROM python:3.12-slim

Expand Down
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
web: gunicorn project.wsgi --workers 2 --log-file - --bind 0.0.0.0:8000
worker: ./manage.py run_huey --skip-checks
frontend: npm run watch
frontend: npm --prefix frontend run watch
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ brew install nodejs
Install JS packages to get Tailwind CSS.

```bash
npm i
npm --prefix frontend i
```

## Development
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"scripts": {
"build": "tailwindcss build --minify -i site.css -c tailwind.config.js -o ../static/site.css",
"watch": "tailwindcss build -i site.css -c tailwind.config.js -o ../static/site.css --watch"
},
"engines": {
"node": "18.x"
},
"devDependencies": {
"autoprefixer": "^10.4.2",
"postcss": "^8.4.31",
"tailwindcss": "^3.0.23"
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion frontend/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
content: [
'./templates/**/*.html',
'../templates/**/*.html',
],
theme: {
colors: {
Expand Down
14 changes: 0 additions & 14 deletions package.json

This file was deleted.

0 comments on commit 34ef945

Please sign in to comment.