Skip to content
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

generate css again #281

Open
wants to merge 7 commits into
base: hakyll
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ jobs:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}

- uses: actions/setup-node@v3
name: Setup NodeJS
with:
node-version: 18

- uses: actions/cache@v3
name: Cache ~/.stack
with:
Expand All @@ -54,6 +59,11 @@ jobs:
- name: Build site
run: stack exec --system-ghc site rebuild

- name: Build CSS
run: |
npm ci
npm run build:production

- name: Deploy
# Deploy only from non-pull-request changes to hakyll branch
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/hakyll'}}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ _site/
stack.yaml.lock
dist-newstyle/

### NodeJS ###
node_modules/

### General ###
*~
.DS_Store
310 changes: 307 additions & 3 deletions assets/css/main.css

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions assets/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* WARNING: This file will be overwritten when the site is built.
* Do not put anything in here that is unrelated to tailwind.
*
* NOTE: The underlying implementation details of how this works are as follows
* 1. tailwindcss needs these directives in order to know where to generate the
* output
* 2. first, hackyll is run and will copy this file to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 2. first, hackyll is run and will copy this file to
* 2. first, hakyll is run and will copy this file to

* _sites/assets/tailwind.css
* 3. then, after hackyll is done, postcss will be ran on _this_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 3. then, after hackyll is done, postcss will be ran on _this_
* 3. then, after hakyll is done, postcss will be ran on _this_

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 3. then, after hackyll is done, postcss will be ran on _this_
* 3. then, after hackyll is done, postcss will be run on _this_

* assets/tailwind.css file. Postcss will, during execution, invoke
* tailwindcss. tailwindcss (the compiler) will scan all the files in the
* site for tailwind classes (including _this_ assets/tailwind.css file).
* 4. postcss's output file is configured to be _site/assets/tailwind.css
* (which causes this file to get overwritten with the correct contents)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not this file, right? It sounds like it should overwrite the one in _site, not this one. Or did I misunderstand?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct. I'll fix that :)

*/

@tailwind base;
@tailwind components;
@tailwind utilities;
2 changes: 0 additions & 2 deletions dep/nixpkgs/default.nix

This file was deleted.

8 changes: 0 additions & 8 deletions dep/nixpkgs/github.json

This file was deleted.

9 changes: 0 additions & 9 deletions dep/nixpkgs/thunk.nix

This file was deleted.

17 changes: 0 additions & 17 deletions dep/node/default.nix

This file was deleted.

Loading