A minimal template for the WHEAT stack (Wrangler, HTMX, Eleventy, Alpine, Tailwindcss).
MIT License
Welcome to the WHEAT stack, a powerful combination of tools for quickly spinning up web apps on Cloudflare Pages. WHEAT stands for Wrangler, HTMX, Eleventy, Alpine, and Tailwind CSS, bringing the TEA stack into a quick and usable form.
This project uses the following frameworks and libraries:
Clone the repository:
Copy code
git clone https://github.com/emelleme/wheat-stack.git cd wheat-stack
Switch to the valid Node version:
Copy code
nvm use
Install dependencies:
Copy code
npm install
Start the development server:
Copy code
npm run dev
Build the production-ready site:
Copy code
npm run build
Feel free to check the package.json
file to see all available scripts and packages being utilized.
npm run build && npx wrangler pages dev dist
will boot up a local server of your production site to preview before deployment.To deploy your WHEAT stack app to Cloudflare Pages:
npm run build
dist
The WHEAT stack supports Cloudflare Pages Functions, allowing you to run serverless functions directly from your Cloudflare Pages project. To create and use functions:
functions
folder for each function you want to add.For example, if you create a function file named hello.js
in the functions
folder, it will be accessible at a URL like https://your-project.pages.dev/hello
.
The WHEAT stack includes a prebuild.sh
file that runs during the Cloudflare Pages build process. This script can be used to perform any necessary setup or preprocessing tasks before the build.
To customize the prebuild script:
prebuild.sh
file in your project.The prebuild.sh
script will be automatically executed before the build process begins, allowing you to prepare your project environment or perform any necessary setup tasks.
I appreciate you taking the time to check out the WHEAT stack. Please leave a star and share it if you found it useful!