Compare commits
4 Commits
5b7fed2cb8
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
994107305b | ||
|
|
514dc490b5 | ||
|
|
f4782bc9cd | ||
|
|
361f57424c |
10
.vscode/settings.json
vendored
10
.vscode/settings.json
vendored
@@ -3,6 +3,14 @@
|
||||
"tree.indentGuidesStroke": "#3d92ec",
|
||||
"activityBar.background": "#213309",
|
||||
"titleBar.activeBackground": "#2E470C",
|
||||
"titleBar.activeForeground": "#F6FCEE"
|
||||
"titleBar.activeForeground": "#F6FCEE",
|
||||
"titleBar.inactiveBackground": "#213209",
|
||||
"titleBar.inactiveForeground": "#F7FCEF",
|
||||
"statusBar.background": "#213209",
|
||||
"statusBar.foreground": "#F7FCEF",
|
||||
"statusBar.debuggingBackground": "#213209",
|
||||
"statusBar.debuggingForeground": "#F7FCEF",
|
||||
"statusBar.noFolderBackground": "#213209",
|
||||
"statusBar.noFolderForeground": "#F7FCEF"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,17 +8,17 @@ const start = performance.now();
|
||||
|
||||
// Tailwind to CSS
|
||||
try {
|
||||
// Ensure the output directory exists
|
||||
if (!fs.existsSync(distDir)) {
|
||||
fs.mkdirSync(distDir, { recursive: true });
|
||||
}
|
||||
// Ensure the output directory exists
|
||||
if (!fs.existsSync(distDir)) {
|
||||
fs.mkdirSync(distDir, { recursive: true });
|
||||
}
|
||||
|
||||
// Compile Tailwind
|
||||
tailwindToCSS();
|
||||
// Compile Tailwind
|
||||
tailwindToCSS();
|
||||
|
||||
const end = performance.now();
|
||||
const runtime = (end - start).toFixed(3);
|
||||
console.log(`Production build successfully run in ${runtime}ms`);
|
||||
const end = performance.now();
|
||||
const runtime = (end - start).toFixed(3);
|
||||
console.log(`Production build successfully run in ${runtime}ms`);
|
||||
} catch (error) {
|
||||
console.error("Error processing CSS files:", error);
|
||||
console.error("Error processing CSS files:", error);
|
||||
}
|
||||
|
||||
@@ -14,12 +14,12 @@ const cwd = path.resolve("..");
|
||||
|
||||
// Compile Tailwind
|
||||
module.exports.tailwindToCSS = debounce(() => {
|
||||
try {
|
||||
require("child_process").execSync(
|
||||
`npx @tailwindcss/cli -i styles/theme.css -o static/dist/theme.css`,
|
||||
{ stdio: "inherit" }
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(`Error compiling Tailwind to CSS:`, error);
|
||||
}
|
||||
try {
|
||||
require("child_process").execSync(
|
||||
`./node_modules/.bin/tailwindcss -i styles/theme.css -o static/dist/theme.css`,
|
||||
{ stdio: "inherit" }
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(`Error compiling Tailwind to CSS:`, error);
|
||||
}
|
||||
}, 50);
|
||||
|
||||
@@ -10,39 +10,39 @@ const cwd = path.resolve("../");
|
||||
|
||||
// Initialize BrowserSync
|
||||
browserSync.init({
|
||||
proxy: process.env.LOCALHOST_URL,
|
||||
port: process.env.BROWSERSYNC_PORT,
|
||||
cors: true,
|
||||
cwd: cwd,
|
||||
logLevel: `warn`,
|
||||
minify: false,
|
||||
open: false,
|
||||
ui: false,
|
||||
ghostMode: false,
|
||||
reloadOnRestart: true,
|
||||
notify: false,
|
||||
watch: true,
|
||||
proxy: process.env.LOCALHOST_URL,
|
||||
port: process.env.BROWSERSYNC_PORT,
|
||||
cors: true,
|
||||
cwd: cwd,
|
||||
logLevel: `warn`,
|
||||
minify: false,
|
||||
open: false,
|
||||
ui: false,
|
||||
ghostMode: false,
|
||||
reloadOnRestart: true,
|
||||
notify: false,
|
||||
watch: true,
|
||||
});
|
||||
|
||||
// Reload JS during development
|
||||
browserSync.watch(`static/js/*.js`, (event, file) => {
|
||||
if (event !== "change") return;
|
||||
if (event !== "change") return;
|
||||
|
||||
const start = performance.now();
|
||||
try {
|
||||
browserSync.stream();
|
||||
const end = performance.now();
|
||||
const runtime = (end - start).toFixed(3);
|
||||
console.log(`JS re-injected successfully in ${runtime}ms`);
|
||||
} catch (error) {
|
||||
console.log("Error compiling JS:", error);
|
||||
}
|
||||
const start = performance.now();
|
||||
try {
|
||||
browserSync.stream();
|
||||
const end = performance.now();
|
||||
const runtime = (end - start).toFixed(3);
|
||||
console.log(`JS re-injected successfully in ${runtime}ms`);
|
||||
} catch (error) {
|
||||
console.log("Error compiling JS:", error);
|
||||
}
|
||||
});
|
||||
|
||||
// Compile tailwind to css and reload on changes
|
||||
browserSync.watch(["**/*.css", "**/*.php"], (event, file) => {
|
||||
if (event !== "change") return;
|
||||
if (event !== "change") return;
|
||||
|
||||
tailwindToCSS();
|
||||
browserSync.reload();
|
||||
tailwindToCSS();
|
||||
browserSync.reload();
|
||||
});
|
||||
|
||||
80
package.json
80
package.json
@@ -1,42 +1,42 @@
|
||||
{
|
||||
"name": "vdi-starter-v5",
|
||||
"version": "5.0",
|
||||
"description": "VDI-Starter-v5 is a minimal WordPress theme designed as a starting point for custom theme development. It focuses on modern development approaches with a lean architecture that avoids the overhead of theme frameworks.",
|
||||
"scripts": {
|
||||
"start": "npm run watch",
|
||||
"watch": "node bin/.watch.js",
|
||||
"build": "npx @tailwindcss/cli -i ./styles/theme.css -o ./static/dist/theme.css --optimize"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Vincent-Design-Inc/VDI-Starter-v5.git"
|
||||
},
|
||||
"keywords": [
|
||||
"wordpress",
|
||||
"minimal",
|
||||
"basic",
|
||||
"custom",
|
||||
"theme"
|
||||
],
|
||||
"author": "Keith Solomon <keith@vincentdesign.ca>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Vincent-Design-Inc/VDI-Starter-v5/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Vincent-Design-Inc/VDI-Starter-v5#readme",
|
||||
"devDependencies": {
|
||||
"@axe-core/playwright": "^4.10.1",
|
||||
"@playwright/test": "^1.52.0",
|
||||
"@types/node": "^22.15.2",
|
||||
"browser-sync": "^3.0.3",
|
||||
"dotenv": "^16.4.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/cli": "^4.0.13",
|
||||
"@tailwindcss/typography": "^0.5.16",
|
||||
"glob": "^10.3.10",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"tailwindcss": "^4.0.13"
|
||||
}
|
||||
"name": "vdi-starter-v5",
|
||||
"version": "5.0",
|
||||
"description": "VDI-Starter-v5 is a minimal WordPress theme designed as a starting point for custom theme development. It focuses on modern development approaches with a lean architecture that avoids the overhead of theme frameworks.",
|
||||
"scripts": {
|
||||
"start": "npm run watch",
|
||||
"watch": "node bin/.watch.js",
|
||||
"build": "./node_modules/.bin/tailwindcss -i ./styles/theme.css -o ./static/dist/theme.css --optimize"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Vincent-Design-Inc/VDI-Starter-v5.git"
|
||||
},
|
||||
"keywords": [
|
||||
"wordpress",
|
||||
"minimal",
|
||||
"basic",
|
||||
"custom",
|
||||
"theme"
|
||||
],
|
||||
"author": "Keith Solomon <keith@vincentdesign.ca>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Vincent-Design-Inc/VDI-Starter-v5/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Vincent-Design-Inc/VDI-Starter-v5#readme",
|
||||
"devDependencies": {
|
||||
"@axe-core/playwright": "^4.10.1",
|
||||
"@playwright/test": "^1.52.0",
|
||||
"@types/node": "^22.15.2",
|
||||
"browser-sync": "^3.0.3",
|
||||
"dotenv": "^16.4.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"tailwindcss": "^4.0.13",
|
||||
"@tailwindcss/cli": "^4.0.13",
|
||||
"@tailwindcss/typography": "^0.5.16",
|
||||
"glob": "^10.3.10",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash.debounce": "^4.0.8"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user