stylus / nib

Stylus mixins, utilities, components, and gradient image generation
http://stylus.github.io/nib
MIT License
1.9k stars 250 forks source link

Would love to use this but I'm a NodeJS/Express/Connect virgin #137

Closed corysimmons closed 10 years ago

corysimmons commented 12 years ago

Is there a simple way to use nib without having to know NodeJS/Express/Connect?

Either way, could I request a screenr screencast on installation from scratch?

corysimmons commented 12 years ago

Yeah seriously, I've been trying to figure this out for the greater part of this day. So far I've studied NodeJS, ExpressJS, ConnectJS, and have created applications specifically designed to enable nib to no avail.

Too hard for people to pick up. Off to Compass with me. Sucks too because stylus/nib looked really nice.

tj commented 12 years ago

you don't need connect or express, just stylus to use nib. It would be a similar case if someone who was a Ruby noob tried to use those tools. I used to have a simple web one set up on nodejitsu's service that you just POST to but I think that is gone now

corysimmons commented 12 years ago

Please for the love of God help me figure out how to use Stylus + nib efficiently.

I am a Ruby noob and I've already figured out how to set up a project with Compass and watch files for changes and grab extensions, etc. but it's so, so, ugly.... :(

jonathanong commented 12 years ago

i think there should be instructions somewhere, and maybe i'm doing it wrong, but this is how i do it:

npm install -g stylus nib

Makefile:

build:
  stylus -u nib styles/styles.styl -o ./public/styles

styles/styles.styl

@import 'nib'

.clearfix
  clearfix()

doing make build should compile styles.styl to public/styles/styles.css

corysimmons commented 12 years ago

2 things. How do you create a makefile? Is it literally a file? What filename? How can I "watch" a directory with your method?

jonathanong commented 12 years ago

okay well, that Makefile part is optional. just running the command stylus -u nib styles/styles.styl -o ./public/styles should work. But the Makefile is literally just a file called Makefile. This is assuming you're on UNIX.

Just adding a -w should work for watching

stylus -w -u nib styles/styles.styl -o ./public/styles
corysimmons commented 12 years ago

jonathanong you're a hero! Thank you!

npm install -g stylus nib
stylus -u nib -w

Works perfect! Adios crappy SASS :dancer:

DavidOliver commented 10 years ago

Looks like this one can be closed. :-)

notslang commented 10 years ago

thanks @DavidOliver