Less Windows Node.js Hanging

情到浓时终转凉″ 提交于 2019-12-04 07:56:00

yes, use lessphp (server side)

Symfony2.1. How to integrate assetic lessphp filter. Add the following

package to your composer.json:

"require": {
    ...
    "leafo/lessphp": "dev-master",
    ...
}

Run php composer.phar update

and update your config.yml

#...
assetic:
    #...
    filters:
        lessphp:
            file: %kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php
            apply_to: "\.less$"

or use the less.js (client side)

<link rel="stylesheet/less" type="text/css" href="styles.less">
<script src="less.js" type="text/javascript"></script>

I used the following and this works for me. NOTE that it is 'node.exe' and not just node.

node: "C:\\Program Files (x86)\\nodejs\\node.exe"
node_paths: ["C:\\Users\\Ben\AppData\\Roaming\\npm\\node_modules"] 
apply_to:   "\.less$"

Since no one really has any answers, I can only assume there are very few Windows developers using LESS and node.js in Symfony2.

My solution was to use lessphp which worked fine once I got it into the autoloader.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!