marcamos / jet Goto Github PK
View Code? Open in Web Editor NEWIt‘s (j)ust (e)leventy and (t)ailwind … OK, and a few other things; it‘s still *really* small though.
License: MIT License
It‘s (j)ust (e)leventy and (t)ailwind … OK, and a few other things; it‘s still *really* small though.
License: MIT License
I downloaded the project ran "npm i" then "npm run dev" and got this
`dan.levin@Dan-Levins-MacBook-Pro-2 jet-master % npm run dev
[email protected] dev /Users/dan.levin/Sites/jet-master
npm run clean && postcss src/css/tailwind.css > src/css/styles.css && eleventy --serve
[email protected] clean /Users/dan.levin/Sites/jet-master
rm -rf public src/css/styles.css
TypeError: Object.entries(...).flatMap is not a function
at flattenColorPalette (/Users/dan.levin/Sites/jet-master/node_modules/tailwindcss/lib/util/flattenColorPalette.js:8:83)
at /Users/dan.levin/Sites/jet-master/node_modules/tailwindcss/lib/plugins/divideColor.js:27:53
at plugins.forEach.plugin (/Users/dan.levin/Sites/jet-master/node_modules/tailwindcss/lib/util/processPlugins.js:69:5)
at Array.forEach ()
at _default (/Users/dan.levin/Sites/jet-master/node_modules/tailwindcss/lib/util/processPlugins.js:63:11)
at /Users/dan.levin/Sites/jet-master/node_modules/tailwindcss/lib/processTailwindFeatures.js:60:54
at LazyResult.runOnRoot (/Users/dan.levin/Sites/jet-master/node_modules/postcss/lib/lazy-result.js:303:16)
at LazyResult.runAsync (/Users/dan.levin/Sites/jet-master/node_modules/postcss/lib/lazy-result.js:355:26)
at LazyResult.async (/Users/dan.levin/Sites/jet-master/node_modules/postcss/lib/lazy-result.js:205:30)
at LazyResult.then (/Users/dan.levin/Sites/jet-master/node_modules/postcss/lib/lazy-result.js:190:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: npm run clean && postcss src/css/tailwind.css > src/css/styles.css && eleventy --serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`
Hey there, I'm Ryan Cao
https://twitter.com/marcamos/status/1296459347774627843
I really like how it's just 11ty and Tailwind CSS without Webpack or some other whatnot
And it's more optimized than my approach in the tweet
Thanks 😉
The README could benefit from mentioning what can/should be done after running the build
command. For example, host it somewhere, etc.
Thanks for putting this together - was literally about to roll my own as the starters are usually pretty crufty, but this is perfect.
Cool project, it would be useful if it was a template so that creating a new GitHub repo based on it is just 1 click away.
Spend a little time with it, first, and if everything's smooth and simple, update to it.
I've tried using jet as a template and by cloning it, and in both cases I get an error on npm run dev
. I'm following the steps in the readme. I saw #33 (comment) and thought I might be having the same problem, but on closer inspection it's a different error. I'm on node 14.16.0. Let me know if there's any other information I can provide. Thanks!
C:\Users\Lee\Documents\Dev\jet>npm run dev
> [email protected] dev C:\Users\Lee\Documents\Dev\jet
> npm run clean && postcss src/css/tailwind.css > src/css/styles.css && eleventy --serve
> [email protected] clean C:\Users\Lee\Documents\Dev\jet
> rm -rf public src/css/styles.css
'rm' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] clean: `rm -rf public src/css/styles.css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] clean script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Lee\AppData\Roaming\npm-cache\_logs\2021-03-06T02_52_28_894Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `npm run clean && postcss src/css/tailwind.css > src/css/styles.css && eleventy --serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Lee\AppData\Roaming\npm-cache\_logs\2021-03-06T02_52_28_922Z-debug.log
Hello,
First, thank your for that setup, it is very helpful and made me kickstart my website very quickly.
Now I do not understand why we need that code:
eleventyConfig.on('eleventy.after', async () => {
console.log('Building Tailwind…');
console.log(execSync('npm run build:tailwind').toString());
});
It makes eleventy unresponsive when making changes.
I just removed it and everything seems fine, since the dev
script calls the tailwind build anyway: npm-run-all clean --parallel dev:*
. I just had to add build:tailwind
in the build
script, as in NODE_ENV=production npm-run-all clean build:eleventy build:tailwind
.
And all is fine. Tthe build seems correct and changes to the markdown or templates are immediately refreshing the page in the browser.
Am I missing something here?
Thank you!
The Tailwind CSS docs recommends using autoprefixer
with PostCSS...
Would that be too much?
I'm not sure if I'm missing something obvious from the config, however, should altering .css files recompile tailwind without having to restart the npm task?
cc @ryanccn
Something in #12 had a negative side-effect when ported to my personal blog (private repo) where, upon running npm run build
, the files copied to /public
all have today's date, rather than the date the /src
file was created.
I'm going to investigate and attempt to fix there, first, then back-port the fix here to jet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.