php - Laravel 4, Basset, Less - preg_match compilation failed -
background: using ubuntu 12.04, php 5.5.1-2, , laravel 4.
when run:
php artisan basset:build
i error
{"error":{"type":"errorexception","message":"preg_match(): compilation failed: nothing repeat @ offset 0", "file":"\/home\/ryan\/myapp6\/vendor\/jasonlewis\/basset\ /src\/basset\/filter\/filter.php","line":241}}
my problem similar this: how make less work basset in laravel 4?
however, have tried lessphpfilter, , have node.js installed... can manually compile stylesheet node, neither work me through basset.
for example, given mytest.less:
@color:blue; body{ background-color: red; color:@color; }
myapp/app/config/packages/jasonlewis/basset/config.php
'collections' => array( 'mytest-css' => function($collection) { $collection->directory('assets/bs3/css', function($collection) { $collection->add('../less/mytest.less')->apply('less'); })->apply('urirewritefilter')->setarguments(public_path()); }, ...
when pull page in browser, background red, text still black. in chrome devtools, can see compiled css file, content still:
@color:blue; body{ background-color: red; color:@color; }
what doing wrong? hint how approach tracking down appreciated - thank you!
the lessphpfilter needed, in app/config/packages/jasonlewis/basset/config.php
i need add leading slash follows:
'less' => array('lessphpfilter', function($filter) { $filter->whenassetis('/*.less')->findmissingconstructorargs(); }),
i hope helps else.
Comments
Post a Comment