Pre-processor stylus - Error while running the stylus watch

1

Hello, I have the following problem:

When you run 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 plays to the main.css file as a normal css .

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

And on the console the message: compiled main.css is triggered 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
    
asked by anonymous 25.02.2017 / 18:51

1 answer

2

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

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

    
26.02.2017 / 14:58