1 line
9 KiB
Markdown
1 line
9 KiB
Markdown
|
|
# Provisioning Poster Build System\n\nA modern, optimized build system for the Provisioning poster using Nushell scripts. This system provides development and production workflows with advanced optimization techniques.\n\n## 🎯 Features\n\n- **📦 Modular CSS**: Split into focused modules (base, components, animations, patterns)\n- **🚀 Fast Development**: File watching with auto-rebuild\n- **⚡ Production Optimization**: CSS/HTML/SVG minification and compression\n- **🎨 SVG Management**: Smart inlining vs external loading strategy\n- **📊 Performance Analysis**: Detailed size and optimization reports\n- **🌐 Development Server**: Built-in HTTP server with live reload\n- **🔧 Zero Dependencies**: Pure Nushell implementation, no Node.js required\n\n## 📁 Project Structure\n\n```plaintext\nposter/\n├── src/ # Source files (development)\n│ ├── index.html # Main HTML file\n│ ├── assets/\n│ │ ├── css/\n│ │ │ ├── main.css # Main CSS entry point\n│ │ │ ├── svg-data.css # SVG data URIs\n│ │ │ └── modules/ # Modular CSS files\n│ │ │ ├── base.css # Reset, typography, layout\n│ │ │ ├── components.css # UI components\n│ │ │ ├── animations.css # All animations\n│ │ │ └── patterns.css # Visual patterns\n│ │ └── svg/\n│ │ ├── symbols.svg # Animated symbols (inline)\n│ │ └── decorative-sprites.svg # Decorative patterns\n│ └── components/ # HTML partials (future)\n│\n├── dist/ # Built files (production)\n│ ├── index.html # Optimized HTML\n│ ├── assets/\n│ │ ├── css/\n│ │ │ └── main.min.css # Minified CSS\n│ │ └── svg/\n│ │ └── sprites.svg # Optimized SVG\n│ ├── .htaccess # Apache configuration\n│ ├── nginx.conf # Nginx configuration\n│ └── deploy.sh # Deployment script\n│\n├── scripts/ # Build scripts\n│ ├── build.nu # Main build script\n│ ├── dev.nu # Development workflow\n│ ├── prod.nu # Production workflow\n│ ├── optimize-css.nu # CSS optimization\n│ ├── optimize-svg.nu # SVG optimization\n│ ├── optimize-html.nu # HTML optimization\n│ └── utils.nu # Utility functions\n│\n└── config/\n └── build.config.nu # Build configuration\n```\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- **Nushell 0.105.2+** - [Install Nushell](https://www.nushell.sh/book/installation.html)\n\n### Development\n\n```bash\n# Start development server with file watching\nnu scripts/dev.nu --watch --port 3000\n\n# Quick development build only\nnu scripts/dev.nu build\n\n# Lint and validate source files\nnu scripts/dev.nu lint\n```\n\n### Production\n\n```bash\n# Full production build with optimization\nnu scripts/prod.nu\n\n# Production build with analysis and compression\nnu scripts/prod.nu full\n\n# Quick production build\nnu scripts/prod.nu quick\n```\n\n## 🛠️ Commands Reference\n\n### Development Commands\n\n| Command | Description |\n|---------|-------------|\n| `nu scripts/dev.nu` | Start dev server with file watching |\n| `nu scripts/dev.nu build` | Quick development build |\n| `nu scripts/dev.nu clean` | Clean development build |\n| `nu scripts/dev.nu analyze` | Build with file size analysis |\n| `nu scripts/dev.nu lint` | Lint and validate source files |\n| `nu scripts/dev.nu preview` | Preview production build locally |\n\n#### Development Options\n\n- `--port, -p <PORT>` - Development server port (default: 8080)\n- `--watch, -w` - Enable file watching for auto-rebuild\n- `--no-browser, -n` - Don't open browser automatically\n- `--verbose, -v` - Verbose output\n\n### Production Commands\
|