Table of Contents
This is a skeletonal structure for a todo app to mainly focus on implementing TailwindCSS and DaisyUI to connect with your Views EJS. Everything else can be changed to fit your need for your app.
This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
- EJS
- TailWind
- DaisyUI
- JavaScript
- Node.js
- Mongooose
bcrypt, connect-mongo, dotenv, ejs, express, express-flash, express-session, mongodb, mongoose, morgan, nodemon, passport, passport-local, validator, daisyui
devDependencies: autoprefixer, postcss, postcss-import, tailwindcss, nodemon
Fork the repo, clone and begin your coding!
This is an example of how to list things you need to use the software and how to install them.
- npm
npm install npm@latest -g
- For the Repo
- Clone the repo
git clone https://github.com/HondaChan14/TailwindCSS-DaisyUI-EJS-Template.git
- Install NPM packages
npm install
- Enter your DB_STRING in
.env
const DB_STRING = 'ENTER YOUR MONGODB CONNECTION STRING'; const PORT = 'ENTER YOUR LOCALHOST PORT NUMBER'; EX: 2121
- Followed the install instructions steps 1 from here: https://tailwindcss.com/docs/installation/using-postcss
A. Create your [postcss.config.js] file. Some reason it isn't made when installing postcss
B. Then copy paste the 2nd Step box to [postcss.config.js]
C. Then for ejs, you add to your contents section in your [tailwind.config.js]: "./views/**/*.ejs"
D. copy paste the fourth box into your style.css Then set up the main style.css in a src folder. (This is where you will add your CSS)
E. Then you go to your package.json and use this for the script "build-css": "tailwindcss -i src/style.css -o public/style.css --watch" (Doing this will link your src/style.css and create a public/style.css with TailwindCSS elements autocreated ) Basically the Nodemon of Tailwind/DaisyUI. Watch at the end means that you only have to run it the one time and then every time you save a file it rebuilds the CSS and you don't have to keep restarting it
- Run Both Nodemon and TailwindCSS-DaisyUI
npm run dev in one Terminal for Nodemon
npm run build-css in another Terminal to see TailwindCSS/DaisyUI updates
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Jason Jugo Aka Honda - @HondaCivicChan