I am getting really confused with less.js! I am new to less and trying to get it installed and test using variables in css etc.
I installed nodejs from nodejs.org and then run the c: prompt on my computer and typed npm install less and enter. This is what happened:-
npm http GET https://registry.npmjs.org/less
npm http 200 https://registry.npmjs.org/less
npm http GET https://registry.npmjs.org/less/-/less-1.3.0.tgz
npm http 200 https://registry.npmjs.org/less/-/less-1.3.0.tgz
So I am guessing it worked!
I basically want to develop a website using less.js on my localhost (WAMP) and then upload to a web server.
I have no idea how to get started to be honest. I have read and re-read the website lesscss.org but it's just lost me!
I created a website project on the localhost and linked in the styles.less and also the less.js file as the site asks.
How can I make it all work?
Do I enter the variables in styles.less and save? If I do that then nothing is shown in styles.css
Help please from a very confused user
Thank you people,
you would need to use node to host your site, or at least part of it, instead of apache.
you could host node on a different port, and server your css files from that non-80 port.
the trouble with that is that relative paths in the css are broken. if you use full urls (starts with "http" in your css, it can work fine.
a refinement on that is to grab the non-80 port in php and re-serve it using php/apache from your site. with php using a simple 90-second APC-based cache to avoid repeated internal http requests each .less file view, the performance should be pretty solid.
let me know if you want more info on getting node to work alongside php.
Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com
Hi rnd me!
I am not too sure how but it's kinda working!
I installed node and then I typed the line in the command window to activate less.js as it said on their website. If I create a rule in style.less and then link that to the index.html file along with the less.js it works.
However I need a normal style.css file to do all my other code in?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread