cypresslab/less-elephant-bundle
less_binary_path and define LESS projects in config_dev.yml. No additional PHP extensions or runtime dependencies beyond lessc (which must be installed system-wide).force_compile: false with a cache (e.g., Symfony’s asset system or Varnish).lessc Binary Requirement: Must be pre-installed on the server (path configurable). Docker/Kubernetes deployments may need custom setup.lessc version; may lack support for newer LESS syntax (e.g., @supports, advanced variables).destination_css paths are within the web root or secure directories to avoid exposure.source_folder is user-provided (e.g., via config), risk of path traversal attacks exists.AssetMapper, HTTP caching) mitigate redundant compilations?lessc be installed/managed across environments (dev/staging/prod)?lessc?lessc version upgrades?lessc fails (e.g., serve pre-compiled CSS)?source_folder and destination_css paths hardcoded or dynamically generated? If dynamic, how is input validated?league/less-php) with better performance?lessc is available (e.g., cPanel with PHP extensions).lessc installation in the base image or sidecar.@import dependencies, custom mixins).lessc compatibility with current LESS syntax (test edge cases).config_dev.yml with force_compile: true for initial testing.force_compile and rely on cache headers or CDN.lessc commands in CI/CD with Symfony’s asset system.lessc fails.@import, variables, and mixins but may lack support for:
@supports, source-map-url).less-plugin-*).var/cache/ (requires manual setup).Last-Modified/ETag headers are sent for compiled assets.lessc globally or via Docker (FROM node:16 + npm install -g less).destination_css paths.composer.json:
"cypresslab/less-elephant-bundle": "^1.0"
config/bundles.php (Symfony 4+):
return [
// ...
CypressLab\LessElephantBundle\CypressLabLessElephantBundle::class => ['all' => true],
];
config/packages/dev/cypress_less_elephant.yaml:
cypress_less_elephant:
less_binary_path: "/usr/local/bin/lessc"
less_projects:
app:
source_folder: "%kernel.project_dir%/assets/less"
source_file: "styles.less"
destination_css: "%kernel.project_dir%/public/css/styles.css"
force_compile: "%kernel.debug%"
<link rel="stylesheet" href="{{ asset('css/styles.css') }}">
monolog for errors).lessc version updates (may break LESS syntax).less_projects must be updated if LESS file paths change (e.g., during refactoring).source_folder: "%env(LESS_SOURCE_DIR)%") to avoid hardcoding.lessc version in Dockerfiles or deployment scripts to avoid runtime mismatches.cypress_less_elephant:
debug: true
lessc not found → Verify less_binary_path.How can I help you explore Laravel packages today?