3gwebtrain
3gwebtrain

Reputation: 15303

How to `automate` the `stylus` nib for static web page?

I am using stylus to create my css file. in the css3 vendor prefix and other advantage, i use the nib package.

I an not building my website using express or any other server. this is pure static. now i require to run the nib package whenever the .styl file changes.

At present i am doing by manual running this command:

stylus -u nib screen.styl - it works well. But i don't want to run this each and every time i change the .styl file.

Is there a automation to run this? or any other work-around to handle this?

sample css for above command :

@import 'nib'

#comments
    border-radius 4
    box-shadow 0 9 1px black

    p
        opacity 0.75

.seeen
    border-radius 4

#slogan
    hide-text()

Upvotes: 0

Views: 139

Answers (1)

Panya
Panya

Reputation: 2699

You can use --watch (or just -w) flag:

stylus -u nib -w screen.styl

Upvotes: 2

Related Questions