Preprocessor Stylus - Error running Stylus watch

Asked

Viewed 27 times

1

Hello, I have the following problem:

When rotating the command stylus main.styl main.css -w the stylus compiles what is saved, that is, it takes what is in the files styl/title.styl and styl/button.syl and play for the archive main.css in normal css form.

But when I edit and save again one of the files in the folder styl the stylus cleans everything in the main.css and leaves the file blank.

And on the console keeps firing the message: compiled main.css countless times.

My code:

main styl.:

@import "styl/*"

styl/title.styl:

h1
    background-color black
    color red

styl/button.styl:

button
    background-color blue
    color red
    width 150px
    height 100px
  • 1

    Test use the flag -o specifies that the next file is compiled. Thus: stylus -w main.styl -o main.css

  • 1

    Worked perfectly man, thanks

1 answer

2


Use the flag -o specifies that the file (after space) is the destination of the CSS that will be compiled.

Thus: stylus -w main.styl -o main.css

Browser other questions tagged

You are not signed in. Login or sign up in order to post.