定制 jasonlewis/basset 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

jasonlewis/basset

最新稳定版本:v4.0.0-BETA2

Composer 安装命令:

composer require jasonlewis/basset

包简介

A better asset management package for Laravel.

README 文档

README

Basset is no longer being maintained by me (Jason Lewis). Appologies to those of you that have invested time into this package. Feel free to fork it if you feel the need but I strongly urged you to shift over to using Grunt to manage the compiling and concatenation of your assets.

Once again, I'm sorry, I just don't have the time and Grunt does an amazing job.

Basset for Laravel 4

Build Status

Basset is a better asset management package for the Laravel framework. Basset shares the same philosophy as Laravel. Development should be an enjoyable and fulfilling experience. When it comes to managing your assets it can become quite complex and a pain in the backside. These days developers are able to use a range of pre-processors such as Sass, Less, and CoffeeScript. Basset is able to handle the processing of these assets instead of relying on a number of individual tools.

Installation

To get the latest version of Basset simply require it in your composer.json file.

"jasonlewis/basset": "dev-master"

You'll then need to run composer install to download it and have the autoloader updated.

Note that once Basset has a stable version tagged you should use a tagged release instead of the master branch.

Once Basset is installed you need to register the service provider with the application. Open up app/config/app.php and find the providers key.

'providers' => array(
    
    'Basset\BassetServiceProvider'

)

Basset also ships with a facade which provides the static syntax for creating collections. You can register the facade in the aliases key of your app/config/app.php file.

'aliases' => array(

    'Basset' => 'Basset\Facade'

)

Documentation

View the official documentation.

Changes

v4.0.0 Beta 3

  • Split the collections and aliases into their own configuration files.
  • Filter method chaining with syntactical sugar by prefixing with and, e.g., andWhenProductionBuild().

v4.0.0 Beta 2

  • Added logging when assets, directories, and filters are not found or fail to load.
  • Allow logging to be enabled or disabled via configuration.
  • Warn users when cURL is being used to detect an assets group.
  • Allow an array of filters to be applied to an asset.
  • Added whenProductionBuild and whenDevelopmentBuild as filter requirements.
  • CssMin and JsMin are only applied on a production build and not on the production environment.
  • Added raw method as an alias to exclude.
  • Entire directory or collection can be set as raw so original path is used instead of assets being built.
  • Development builds only happen for a collection that is used on the loaded request.
  • Added rawOnEnvironment to serve the asset raw on a given environment or environments.

v4.0.0 Beta 1

  • Collections are displayed with basset_javascripts() and basset_stylesheets().
  • Simplified the asset finding process.
  • Can no longer prefix paths with path: for an absolute path, use a relative path from public directory instead.
  • Requirements can be applied to filters to prevent application if certain conditions are not met.
  • Filters can find any missing constructor arguments such as the path to Node, Ruby, etc.
  • Default application collection is bundled.
  • basset:compile command is now basset:build.
  • Old collection builds are cleaned automatically but can be cleaned manually with basset --tidy-up.
  • Packages can be registered with Basset::package() and assets can be added using the familiar namespace syntax found throughout Laravel.
  • Csso support with CssoFilter.
  • Fixed issues with UriRewriteFilter.
  • Development collections are pre-built before every page load.
  • Build and serve pre-compressed collections.
  • Use custom format when displaying collections.
  • Added in Blade view helpers: @javascripts, @stylesheets, and @assets.
  • Assets maintain the order that they were added.

jasonlewis/basset 适用场景与选型建议

jasonlewis/basset 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 63.38k 次下载、GitHub Stars 达 244, 最近一次更新时间为 2012 年 11 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「assets」 「laravel」 「basset」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 jasonlewis/basset 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 jasonlewis/basset 我们能提供哪些服务?
定制开发 / 二次开发

基于 jasonlewis/basset 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 63.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 258
  • 点击次数: 18
  • 依赖项目数: 1
  • 推荐数: 1

GitHub 信息

  • Stars: 244
  • Watchers: 20
  • Forks: 80
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2012-11-13