Skip to content

Commit

Permalink
feat: use Dockerfile to build Tailwind CSS (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikbullo committed Nov 8, 2022
1 parent b4e4a23 commit b1b3efc
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:latest

ENV TAILWIND=/app

WORKDIR $TAILWIND

COPY package.json package-lock.json /$TAILWIND

RUN npm install

ENTRYPOINT ["npm","run", "watch"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@ npx tailwindcss -i styles.css -o src/unfold/static/unfold/css/styles.css --watch

npm run watch
```
Or with Docker

```bash
docker build -t tailwind ./ && \
docker run --rm -it --init -v $(pwd):/app tailwind
```

Some components like datepickers, calendars or selectors in admin was not possible to style by overriding html templates so their default styles are overriden in **styles.css**.

Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "django-unfold",
"description": "Clean & minimal Django admin theme based on Tailwind CSS",
"scripts": {
"watch": "tailwindcss -i styles.css -o src/unfold/static/unfold/css/styles.css --watch --minify"
},
Expand Down

0 comments on commit b1b3efc

Please sign in to comment.