Step 1.2: Vite + Tailwind configuration and initial build

This commit is contained in:
Hanson.xyz Dev
2025-11-28 16:02:05 -06:00
parent 7b1b91eb66
commit fc7c6b0844
8 changed files with 2565 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
{
"main.js": {
"file": "assets/main.js",
"name": "main",
"src": "main.js",
"isEntry": true,
"css": [
"assets/main.css"
]
}
}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
(function(o){o(function(){console.log("HomeProz theme initialized")})})(jQuery);
File diff suppressed because it is too large Load Diff
+21
View File
@@ -0,0 +1,21 @@
{
"name": "homeproz-theme",
"version": "1.0.0",
"description": "HomeProz Real Estate WordPress Theme",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"autoprefixer": "^10.4.16",
"postcss": "^8.4.32",
"sass": "^1.69.5",
"tailwindcss": "^3.4.0",
"vite": "^5.0.10"
},
"dependencies": {
"jquery": "^3.7.1"
}
}
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
@@ -0,0 +1,38 @@
/** @type {import('tailwindcss').Config} */
export default {
content: [
'./**/*.php',
'./src/**/*.{js,scss}',
'./template-parts/**/*.php',
'./patterns/**/*.php',
],
theme: {
extend: {
colors: {
// Brand colors
'hp-dark': '#0A0A0A',
'hp-card': '#161616',
'hp-accent': '#9F3730',
'hp-accent-hover': '#C8473F',
'hp-accent-light': '#BF524B',
'hp-text': '#F5F5F5',
'hp-text-muted': '#B0B0B0',
'hp-border': '#2A2A2A',
'hp-success': '#2E7D32',
'hp-warning': '#F9A825',
'hp-sold': '#757575',
},
fontFamily: {
'display': ['"Abril Fatface"', 'Georgia', 'serif'],
'body': ['Inter', '"Droid Sans"', 'Arial', 'sans-serif'],
},
maxWidth: {
'container': '1200px',
},
aspectRatio: {
'property': '16 / 10',
},
},
},
plugins: [],
};
+37
View File
@@ -0,0 +1,37 @@
import { defineConfig } from 'vite';
import { resolve } from 'path';
export default defineConfig({
root: 'src',
base: './',
build: {
outDir: '../dist',
emptyOutDir: true,
manifest: true,
rollupOptions: {
input: {
main: resolve(__dirname, 'src/main.js'),
},
output: {
entryFileNames: 'assets/[name].js',
chunkFileNames: 'assets/[name].js',
assetFileNames: 'assets/[name].[ext]',
},
},
},
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
},
},
},
server: {
cors: true,
strictPort: true,
port: 5173,
hmr: {
host: 'localhost',
},
},
});