Comments (6)
Hi @enmcewan thanks for catching this -- I have pushed a fix to main for this:
nav ul li a:hover {
@apply text-gray-900 dark:text-gray-400;
}
On my end I was able to see this change via hot reload, so not sure what is going on with your build but it sounds like the _tmp/style.css is not getting "watched" correctly. Did you run npm run build
after running your first npm install
?
from spacebook.
Hi @broeker, no problem. Thanks for building this!
I thought I ran npm run build
initially, but I later ran it again (trying to see if that fixed the other issues) and was getting errors.
As suspected, it's because I'm on Windows .To get the build
script running, I installed the cross-env
package and changed the script to:
"build": "cross-env NODE_ENV=production=true eleventy && cross-env NODE_ENV=production postcss styles/tailwind.css --o _site/style.css && cross-env ./node_modules/.bin/cleancss -o _site/style.css _site/style.css",
I've done that before for other eleventy sites. The build script runs now.
I tried a fresh install of spacebook and with cross-env, updated the script and rannpm run build
.
But still, any changes to Tailwind are not updated. In fact, _tmp\style.css
is never updated with build or start.
I'm thinking there must be another setting somewhere that is ignored on Windows, but there's no errors. Any clues where to look?
from spacebook.
Interesting. Have you tested other eleventy projects?
The way I have the css watch set up mirrors this starter:
https://github.com/gregwolanski/eleventy-tailwindcss-alpinejs-starter
So I'd be curious if you have similar issues on that project or if it is something specfic to mine.I don't have a Windows machine to test but there seem to have been numerous issues (most closed) in the eleventy issue queue for hot reload problems in Windows, perhaps something in here might help?
If you ever do get a working Windows install I'd be interested in adding any changes to my documentation!
from spacebook.
OK, the issue is that I'm running VS Code integrated terminal in Cmd/Node mode. With that, the '& or &&' operator is ignored in the npm scripts. E.g. :
"start": "eleventy --serve & postcss styles/tailwind.css --o _tmp/style.css --watch"
Here only eleventy --serve
runs and the postcss
command is ignored.
One solution in this case (Using Cmd/Node Terminal) is another way to run multiple commands. Install npm-run-all
and then adding new scripts like below:
"postcss": "postcss styles/tailwind.css --o _tmp/style.css --watch",
"eleventy": "eleventy --serve",
"start2": "npm-run-all --parallel postcss eleventy",
Run start2
from the Cmd/Node Terminal and everything works. Note that a similar change is required for the "build"
script.
from spacebook.
Ha! I was in the middle of my reply when yours came in. I actually ran through eleventy-tailwindcss-alpinejs-starter as a sanity check and had the same issue. Finally I recalled an eleventy project from last year I did and used the npm-run-all
solution.
Subsequently I have started using Git and figured out that Git Bash runs everything out of the box. Deduced that after reading this article.
I hope my previous reply is enough for you to update your documentation. If you need anything else, just let me know.
from spacebook.
Nicely done, and thanks for leaving so much info for the next Windows user who stumbles across these issues 🤠
from spacebook.
Related Issues (20)
- Streamlined starter content HOT 1
- Flash of Unstyled Content (FOUC)
- Link to markdown tags returns 404 HOT 2
- A couple more Dark Mode Styling Issues HOT 2
- Enable dark mode by default HOT 2
- Menu triggered by hamburger not sticky HOT 4
- Backlinks support HOT 1
- Dead link in the doc
- npm install creates errors - I am using node v16.7.0 HOT 1
- Table head colour does not contrast with darkmode enabled HOT 1
- Turning Spacebook into a PWA
- custom themes for spacebook
- Password prompt visible after login
- Tailwind 3?
- NetlifyCMS uses "pages" instead of "content/pages"
- Custom links in TOC
- a footer nav are not inline, and the left < has an incorrect orientation
- Throws an error on MacOs Ventura HOT 2
- Fixed: Browser Compatibility: Safari, Firefox iOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spacebook.