|  | 
|  | 1 | +# Cooking With Lit and TailwindCSS | 
|  | 2 | + | 
|  | 3 | +A single-page cooking website built with [Lit](https://lit.dev/) and [Tailwind CSS](https://tailwindcss.com/). | 
|  | 4 | + | 
|  | 5 | +## Table of Contents | 
|  | 6 | + | 
|  | 7 | +-   [Introduction](#introduction) | 
|  | 8 | +-   [Installation](#installation) | 
|  | 9 | +-   [Usage](#usage) | 
|  | 10 | +-   [Production](#production) | 
|  | 11 | +-   [Project Structure](#project-structure) | 
|  | 12 | +-   [Components](#components) | 
|  | 13 | +-   [Data Sources](#data-sources) | 
|  | 14 | + | 
|  | 15 | +## Introduction | 
|  | 16 | + | 
|  | 17 | +This project is a responsive cooking website that showcases recipes, articles, and cooking videos. It is built using Lit for efficient web components and Tailwind CSS for styling. The app features interactive components like a chat window, recipe cards, and a video grid, providing users with an engaging experience. | 
|  | 18 | + | 
|  | 19 | +## Installation | 
|  | 20 | + | 
|  | 21 | +Ensure you have [Node.js](https://nodejs.org/en) installed. | 
|  | 22 | + | 
|  | 23 | +```bash | 
|  | 24 | +npm install | 
|  | 25 | +``` | 
|  | 26 | + | 
|  | 27 | +## Usage | 
|  | 28 | + | 
|  | 29 | +To run the app in development mode with live reloading: | 
|  | 30 | + | 
|  | 31 | +```bash | 
|  | 32 | +npm run dev | 
|  | 33 | +``` | 
|  | 34 | + | 
|  | 35 | +The script above runs the following commands concurrently, scanning your template files for classes, build your CSS, and launch the development server: | 
|  | 36 | + | 
|  | 37 | +-   Tailwind CSS for Main Styles: | 
|  | 38 | + | 
|  | 39 | +    ```bash | 
|  | 40 | +    npm run dev:main-css | 
|  | 41 | +    ``` | 
|  | 42 | + | 
|  | 43 | +    Compiles input.css into tailwind.generated.css and watches for changes. | 
|  | 44 | + | 
|  | 45 | +-   Tailwind CSS for Chat Window Styles: | 
|  | 46 | + | 
|  | 47 | +    ```bash | 
|  | 48 | +    npm run dev:chat-window-css | 
|  | 49 | +    ``` | 
|  | 50 | + | 
|  | 51 | +    Compiles styles specific to the chat window into tailwind.chat-window.generated.css. | 
|  | 52 | + | 
|  | 53 | +-   Rollup watch | 
|  | 54 | + | 
|  | 55 | +    ```bash | 
|  | 56 | +    npm run dev:rollup | 
|  | 57 | +    ``` | 
|  | 58 | + | 
|  | 59 | +    Bundles the JavaScript files using Rollup and watches for changes. | 
|  | 60 | + | 
|  | 61 | +-   Development Server | 
|  | 62 | +    ```bash | 
|  | 63 | +    npm run dev:serve | 
|  | 64 | +    ``` | 
|  | 65 | +    Runs a development server with live reloading | 
|  | 66 | + | 
|  | 67 | +Access the app at http://localhost:8000 (default port). | 
|  | 68 | + | 
|  | 69 | +## Production | 
|  | 70 | + | 
|  | 71 | +To build and serve the production version of the app, run the following command: | 
|  | 72 | + | 
|  | 73 | +```bash | 
|  | 74 | +npm run build | 
|  | 75 | +npm run serve | 
|  | 76 | +``` | 
|  | 77 | + | 
|  | 78 | +The command will: | 
|  | 79 | + | 
|  | 80 | +-   Compile and minify the CSS files. | 
|  | 81 | +-   Bundle and minify JavaScript files using Rollup. | 
|  | 82 | +-   Copy necessary assets to the `dist/` directory. | 
|  | 83 | + | 
|  | 84 | +## Project Structure | 
|  | 85 | + | 
|  | 86 | +``` | 
|  | 87 | +├── dist/                               # Production build output | 
|  | 88 | +├── public/                             # Public assets like images | 
|  | 89 | +├── src/ | 
|  | 90 | +│   ├── data/                           # Data files (recipes, articles, etc.) | 
|  | 91 | +│   ├── lib/ | 
|  | 92 | +│   │   └── components/                 # Lit components | 
|  | 93 | +│   ├── input.css                       # Tailwind CSS input file | 
|  | 94 | +│   └── app.js                          # Main JavaScript entry point | 
|  | 95 | +├── index.html                          # Main HTML file | 
|  | 96 | +├── package.json                        # NPM configuration | 
|  | 97 | +├── tailwind.chat-window.config.js      # Tailwind CSS configuration | 
|  | 98 | +├── tailwind.config.js                  # Tailwind CSS configuration | 
|  | 99 | +└── rollup.config.js                    # Rollup bundler configuration | 
|  | 100 | +``` | 
|  | 101 | +
 | 
|  | 102 | +## Components | 
|  | 103 | +
 | 
|  | 104 | +#### CookingApp (cooking-app.js) | 
|  | 105 | +
 | 
|  | 106 | +The root component that composes all other components to build the app interface. | 
|  | 107 | +
 | 
|  | 108 | +## Data Sources | 
|  | 109 | +
 | 
|  | 110 | +The app uses static data files located in the `src/data/` directory: | 
0 commit comments