dshesh
dshesh

Reputation: 41

Node.js & Less: New to both, how to get my CSS to compile?

So I'm taking over design of a website that a developer (who I can't contact) left. He used Node.js and LESS.

I'm somewhat familiar with Node (how it works but I'm not a developer) and I usually use Sass. Anyways, none of my CSS changes show, which makes me think that it's not compiling right.

I honestly need a 101 answer. I don't even know where my changes should be added and how to compile. I added a screenshot of the structure of the CSS above.

Here is what the structure looks like: https://i.sstatic.net/GUNeL.png

Can anyone help me?

Thanks so much!

Upvotes: 0

Views: 58

Answers (1)

Roland Starke
Roland Starke

Reputation: 1718

The changes should go in the .less files. To compile them to .css files you need to:

  1. download and install node.js from https://nodejs.org
  2. open a terminal in the root folder of your project (there should be a package.json file)
  3. run npm install to install the dependencies listed in the package.json
  4. in the package.json could be a section "scripts": {"build-css": "lessc ..."}
  5. run npm run build-css to execute the command

Upvotes: 1

Related Questions