2

Simple question here, and probably a stupid one. I'm trying to get node-sass-chokidar to output a main.css file into src in my react application but I can only get it to output a main.css directory with the main.css file in it.

"build-css": "node-sass-chokidar src/sass/main.scss -o src/main.css"

enter image description here

Brian Patrick
  • 333
  • 5
  • 18

2 Answers2

3

I just needed to remove the -o flag which outputs a directory instead of a file because it runs mkdir every time I run my build-css script. Fixed.

Brian Patrick
  • 333
  • 5
  • 18
2

Thanks, had the same issue that I wanted to specify where I want my css file to end up after everything gets compiled. Your answer to yourself helped me figure out the changes I need to make in regards to the "build-css" script located in package.json .

If anyone else is a little stuck, read the example section @ https://www.npmjs.com/package/node-sass-chokidar :

Specifically, the section labeled:

Watch a single file and don't perform an initial build until a change has occured:

was very helpful.

Tim Ocampo
  • 21
  • 1
  • 4