hellogerard/less-slim-middleware 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hellogerard/less-slim-middleware

Composer 安装命令:

composer require hellogerard/less-slim-middleware

包简介

Slim Framework middleware to compile LESS CSS files on-the-fly. Supports minification and caching.

README 文档

README

This Slim Framework middleware will compile LESS CSS files on-the-fly using the Assetic library. It supports minification and caching, also via Assetic.

It will intercept requests for CSS files and attempt to find a corresponding LESS file. If one is found, it will compile the file to CSS and serve it, optionally saving the CSS to a filesystem cache. Inspired by less.js-middleware.

Usage

  • src - Directory to look for LESS files. REQUIRED Example: if src is set to /path/to/public, and a request for http://mysite.com/css/style.css is received, then it will look for a LESS file in /path/to/public/css/style.less.
  • cache - Cache CSS file to filesystem. Default is true.
  • cache.dir - Directory for the cached CSS file. Default is src.
  • minify - Minify the CSS output. Default is true.
  • debug - Send debug messages to Slim Logger. Default is false.

Example:

use \Slim\Slim;
use \Slim\Middleware\Less;

$app = new Slim();
$app->add(new Less(array(
    'src' => '/path/to/public',
    'cache' => true,
    'cache.dir' => '/path/to/cache',
    'minify' => true,
    'debug' => false
)));

统计信息

  • 总下载量: 964
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 21
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-05-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固