承接 bradcrumb/lesscompiler 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

bradcrumb/lesscompiler

Composer 安装命令:

composer require bradcrumb/lesscompiler

包简介

CakePHP LessCompiler

README 文档

README

LessCompiler is a CakePHP LESS component to (automatically) compile less-files (http://lesscss.org/) by using less.php (https://github.com/oyejorge/less.php).

Requirements

The master branch has the following requirements:

  • CakePHP 2.2.0 or greater.
  • PHP 5.3.0 or greater.

Installation

  • Clone/Copy the files in this directory into app/Plugin/LessCompiler
  • Ensure the plugin is loaded in app/Config/bootstrap.php by calling CakePlugin::load('LessCompiler');
  • Include the Less component in your AppController.php:
    • public $components = array('LessCompiler.Less');

Documentation

The component will check for less-files to (re)compile automatically when:

  • Debug level is > 0
  • autoRun is set to true in the component settings
  • Cache-time expires

In a live environment one can force the component to (re)compile all less-files by supplying forceLessToCompile=true in the request string.

The component writes cache-files to your CakePHP's cache-directory in a subdirectory called "LessComponent". All less-files should be placed in the app/less directory (to generate css-files in the default webroot/css directory). Less-files for the plugin and themes should be stored in app/Plugin/{pluginname}/less or app/View/Themed/{themename/less.

The default duration time for the cache is 4 hours. After that time the cache expires and after a new request the component will check for updated or added less-files.

Possible Component Settings

public $components = array(
	'LessCompiler.less' 	=> array(
		'sourceFolder' 		=> 'less', 			// Where to look for LESS files, (From the APP directory)
   		'targetFolder' 		=> false, 			// Where to put the generated css (From the webroot directory)
		'formatter' 		=> 'compressed',	// lessphp compatible formatter
		'variables' 		=> array(),			// Pass variables from php to LESS
		'forceCompiling' 	=> false,			// Always recompile
		'autoRun' 			=> false,			// Check if compilation is necessary, this ignores the CakePHP Debug setting
		'sourceMap'			=> false			// Generate sourcemap
	)
);

License

GNU General Public License, version 3 (GPL-3.0) http://opensource.org/licenses/GPL-3.0

统计信息

  • 总下载量: 79
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2013-08-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固