Step 1.2: Vite + Tailwind configuration and initial build
This commit is contained in:
@@ -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
@@ -0,0 +1 @@
|
|||||||
|
(function(o){o(function(){console.log("HomeProz theme initialized")})})(jQuery);
|
||||||
+2449
File diff suppressed because it is too large
Load Diff
@@ -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: [],
|
||||||
|
};
|
||||||
@@ -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',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user