mirror of
https://github.com/prowler-cloud/prowler.git
synced 2025-12-19 05:17:47 +00:00
fix: exclude docs folder from Tailwind content scanning (#9184)
Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com>
This commit is contained in:
@@ -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; \
|
||||
|
||||
@@ -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
32
ui/scripts/postinstall.js
Normal 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");
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user