Code Monkey home page Code Monkey logo

nib's Introduction

Build Status

Nib

Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the documentation.

Installation

$ npm install nib

If the image generation features of Nib are desired, such as generating the linear gradient images, install node-canvas:

$ npm install canvas

JavaScript API

Below is an example of how to utilize nib and stylus with the connect framework (or express).

var connect = require('connect')
  , stylus = require('stylus')
  , nib = require('nib');

var server = connect();

function compile(str, path) {
  return stylus(str)
	.set('filename', path)
	.set('compress', true)
	.use(nib());
}

server.use(stylus.middleware({
	src: __dirname
  , compile: compile
}));

Stylus API

To gain access to everything nib has to offer, simply add:

@import 'nib'

Or you may also pick and choose based on the directory structure in ./lib, for example:

@import 'nib/gradients'
@import 'nib/overflow'

to be continued....

More Information

Testing

You will first need to install the dependencies:

   $ npm install -d

Run the automated test cases:

   $ npm test

For visual testing run the test server:

   $ npm run-script test-server

Then visit localhost:3000 in your browser.

Contributors

I would love more contributors. And if you have helped out, you are awesome! I want to give a huge thanks to these people:

nib's People

Contributors

tj avatar notslang avatar kizu avatar podviaznikov avatar rauchg avatar ianstormtaylor avatar jkernech avatar juriejan avatar kpdecker avatar buschtoens avatar bolasblack avatar iamdustan avatar bluestrike2 avatar alexzel avatar caseywebdev avatar eluberoff avatar leny avatar panya avatar renehamburger avatar tonistiigi avatar slexaxton avatar artnez avatar bengourley avatar davidwood avatar feross avatar tregusti avatar iangreenleaf avatar superstructor avatar jasongiedymin avatar jney avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.