1

I have a watch function which outputs scss code to a css directory, but I'm unsure why sometimes the files are saved in another nested css directory like such:

public/
  sass/
    css/
      css/ // this directory shouldn't exist
        style.css //saved here
      style.css //and here (should only save here)
  style.scss

this is my script: node-sass -w src/public/sass -o src/public/sass/css

1 Answers1

0

have you tried adding a / at the end of your source directory or path? See this answer

Try running this script:

node-sass -w src/public/sass/ -o /src/public/sass/css/

I recommend changing your CSS path into a directory named /dist for best practices. See this reference

example:

node-sass -w src/public/sass/ -o /dist/public/css/
Victor G.S.
  • 61
  • 1
  • 10