fix: exclude docs folder from Tailwind content scanning (#9184)

Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com>
This commit is contained in:
Alan Buscaglia
2025-11-07 10:49:27 +01:00
committed by GitHub
parent 5d4b7445f8
commit a73a79f420
4 changed files with 37 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
COPY scripts ./scripts
RUN \
if [ -f package-lock.json ]; then npm install; \
else echo "Lockfile not found." && exit 1; \

View File

@@ -7,7 +7,7 @@
"start": "next start",
"start:standalone": "node .next/standalone/server.js",
"deps:log": "node scripts/update-dependency-log.js",
"postinstall": "node -e \"const fs=require('fs'); if(fs.existsSync('scripts/update-dependency-log.js')) require('./scripts/update-dependency-log.js'); else console.log('skip deps:log (script missing)');\" && node scripts/setup-git-hooks.js",
"postinstall": "node scripts/postinstall.js",
"typecheck": "tsc",
"healthcheck": "npm run typecheck && npm run lint:check",
"lint:check": "eslint . --ext .ts,.tsx -c .eslintrc.cjs",

32
ui/scripts/postinstall.js Normal file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env node
/**
* Post-install script for Prowler UI
*
* This script runs after npm install to:
* 1. Update dependency log (if the script exists)
* 2. Setup git hooks (if the script exists)
*/
const fs = require("fs");
const path = require("path");
function runScriptIfExists(scriptPath, scriptName) {
const fullPath = path.join(__dirname, scriptPath);
if (fs.existsSync(fullPath)) {
try {
require(fullPath);
} catch (error) {
console.warn(`⚠️ Error running ${scriptName}:`, error.message);
}
} else {
console.log(`Skip ${scriptName} (script missing)`);
}
}
// Run dependency log update
runScriptIfExists("./update-dependency-log.js", "deps:log");
// Run git hooks setup
runScriptIfExists("./setup-git-hooks.js", "setup-git-hooks");

View File

@@ -4,9 +4,10 @@ const { heroui } = require("@heroui/theme");
module.exports = {
darkMode: ["class"],
content: [
"./components/**/*.{ts,jsx,tsx,mdx}",
"./app/**/*.{ts,jsx,tsx,mdx}",
"./components/**/*.{ts,jsx,tsx}",
"./app/**/*.{ts,jsx,tsx}",
"./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}",
"!./docs/**/*",
],
prefix: "",
theme: {