I have been trying to setup Symfony2 on Windows so that I can use assetic with less.
I have installed node.js for Windows (0.6.8). Then I have run npm install less --global
and found less in C:\Users\Matt\AppData\Roaming\npm\node_modules
As far as my Symfony setup, I have the master branch of Assetic
(due to a bug I read about in 1.0.2), but the standard v1.0.1 of AsseticBundle
After some work, I was able to get an example less file to render via: http://localhost/app_dev.php/css/compiled-main_part_1_boilerplate_1.css
Then I switched a .less file that @imports other .less files (in the same subdirectory). Whenever I try to go to that page on my local server (using this less configuration) it hangs and I can see a command process and a node.exe process both running.
The command is trying to run a script in node.js which exists in my temporary directory. I can run that file through node.js in a command prompt fine, but I cannot get it to load using Symfony/Assetic.
Is there anyway to use node.js, less, and assetic on Windows?
Here is my relevant config file sections:
# Assetic Configuration
assetic:
debug: %kernel.debug%
use_controller: false
bundles: [FeedStreamMainBundle]
# java: /usr/bin/java
filters:
cssrewrite: ~
less:
node: %assetic_node%
node_paths: [%assetic_less_path%]
yui_js:
jar: "%kernel.root_dir%/Resources/java/yuicompressor.jar"
yui_css:
jar: %kernel.root_dir%/java/yuicompressor-2.4.2.jar
# closure:
# jar: %kernel.root_dir%/java/compiler.jar
dev config override:
assetic:
use_controller: true
in parameters.ini:
assetic_node="C:\\Program Files (x86)\\nodejs\\node"
assetic_less_path="C:\\Users\\Matt\\AppData\\Roaming\\npm\\node_modules"
assetic_less_path="C:\\web_workspace\\lib\\node_modules"
and I can get the page localhost/app_dev.php/css/… to load once again. Then I try to load that page again or a normal page and it just hangs again... – Desk