expressjs / generator

Express' application generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instructions on how to compile the css engines

blachawk opened this issue · comments

I successfully installed the express-generator on my local dev box, along with a css engine (sass). But I am failing to find any instructions on how to compile a sass file to css. How do we go about that process?

The included engines do not require it to be compiled by any command is why; the middlewares will compile them on the fly as they are requested. The example page in the generated output will load up the css as an example for how to load the end result css from sass source.

The included engines do not require it to be compiled by any command is why; the middlewares will compile them on the fly as they are requested. The example page in the generated output will load up the css as an example for how to load the end result css from sass source.

Here are steps I took just to help me be on the same page with you...

  • I installed the package through the terminal
  • I then ran $DEBUG=livereload:* npm start
  • I then opened up my browser window and went to http://localhost:3000. I can see the page.
  • I then went back into my project and opened up style.sass and made a modification, and saved it.
  • When I open up the style.css file it does not show the update.

What did I miss?

oh, so there is no direct connection between the example sass, and the example .css file in that same directory? ok, then that makes sense. Is this process then left to me to figure out how to have them both talking to each other? or is there a setting, already provided, that I am overlooking, to make that happen?

You have to restart the server after you edited the page, most likely. But I'm not familiar with all the different options, as folks contribute them as they like and we just merge them in. You can find the documentation for the SASS middleware here: https://www.npmjs.com/package/node-sass-middleware