WebFaction
Community site: login faq

I am just beginning to experiment with less and scss. I ended up starting with less because of the simplicity of WinLess, a GUI that lets you add folders to watch and pretty much takes care of the rest!

Which is great for my local environment, but I am wondering how to set up a less compiler on Webfaction?

I found this question - How to install lessc and node. Is this still the accepted method? I only ask because it may very well take me all afternoon to work through those steps and I would like to be sure there isn't some sort of simpleton's control panel installer.

I am using the Bones Framework for Wordpress

Thank you for your consideration. Please let me know if I can provide any other information

asked 14 Jan '13, 16:53

shipwreck
772714
accept rate: 50%


Here is how I installed Node and Less via Putty, mostly following Ryans's excellent guide. I have never done anything like this before. It took me about 45 minutes to go through the steps and read a bit about what I was doing.

I didn't have a src folder in my home directory (I only had bin/lib/logs/webapps) so I created one

mkdir src

I checked the node website and looked for the newest version, then I found the tar.gz in the current versions dist directory. I then downloaded that

wget 'http://nodejs.org/dist/v0.8.17/node-v0.8.17.tar.gz'

I used the ls command to check if anything appeared in my src folder, I saw node-v0.8.17.tar.gz, which I unpacked with

tar -xzf node-v0.8.9.tar.gz

Which gave me a directory I changed into to run the configuration

./configure --prefix=$HOME

Which spit out some variables I don't fully understand and created a couple of new files. I then ran

make

followed by

make install

All hell broke loose with the make command while everything compiled, then installing was a much more familiar experience while folders and directories were created

I cleared the shell hash and checked that node and less are on the right path

hash -r
which node

Then I installed less with the Node Packaged Modules

npm install less --global

I checked that less was installed properly with

which lessc

Both of the 'which' commands should return ~/bin/lessc

Hopefully this helps other first timers get up and running with less. I'm still working out the details on how to get a watch compiler set up. I will edit my answer when I figure it out!

permanent link

answered 15 Jan '13, 16:52

shipwreck
772714
accept rate: 50%

edited 15 Jan '13, 16:53

Is this useful or should I delete this whole question?

(15 Jan '13, 16:54) shipwreck

I guarantee this will be useful for someone. You may want to mark this answer as the accepted answer so it turns green and moves to the top.

(15 Jan '13, 18:15) ryans ♦♦

I only see like or dislike options - and apparently I cant like my own post

(15 Jan '13, 19:59) shipwreck

Okay, we'll have to look into that. I've gone ahead and marked this as the accepted answer.

(15 Jan '13, 20:38) ryans ♦♦

We currently do not have a control panel installer for less - the guide to which you linked is the recommended method.

permanent link

answered 14 Jan '13, 17:20

seanf
12.2k41836
accept rate: 37%

Alright I think I understand. less is just a javascript file which is run via Node.

I can follow Ryans's excellent guide to install Node, then I am wondering about the next step. I want less watch a folder and compile automatically when I change or replace a file. Does less.js have that feature, or do I need a specific watch compiler like:

https://github.com/jonycheung/Dead-Simple-LESS-Watch-Compiler

(14 Jan '13, 21:56) shipwreck
1

You'd need a separate process to watch a folder, which is why the "Dead-Simple-LESS-Watch-Compiler" that you linked was written in the first place.

You could also write a simple version of such a script yourself, and manually run it on cron every few minutes.

(14 Jan '13, 22:34) ryans ♦♦

I followed your guide ryans (thank you, accessible to even a first-timer) and got node installed. However, I deviated when installing less and tried to use npm with:

npm install less --global

I did that based on the instructions from the Dead Simple Less Watch Compiler, apparently the --global flag makes the binary accessible to the system. It appeared to work, but when I check 'which less' I get:

/usr/bin/less

Is there an easy fix for this or should I scrap it and try again? I do see node and lessc in /home/myusername/bin

which node gives me:

~/bin/node

(15 Jan '13, 13:55) shipwreck

Also, to use the Watch Compiler. Do I just download it to the bin that has node and lessc and run the command:

node less-watch-compiler.js FOLDER_TO_WATCH FOLDER_TO_OUTPUT

where the watch and output folders are paths like

/home/username/webapps/shop/wp-content/themes/bones/library/less

/home/username/webapps/shop/wp-content/themes/bones/library/css

(15 Jan '13, 14:09) shipwreck
1

less is the system paging utility. Try running which lessc instead.

(15 Jan '13, 14:09) seanf

Thank you for your prompt response, now I am getting the same proper path for both!

(15 Jan '13, 14:18) shipwreck

I am still curious about how to set up the less watch compiler, is it as simple as I described?

(15 Jan '13, 14:31) shipwreck
showing 5 of 7 show 2 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×113
×7
×3

question asked: 14 Jan '13, 16:53

question was seen: 4,121 times

last updated: 15 Jan '13, 20:38

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM