Git Product home page Git Product logo

metalsmith-stylus's Introduction

metalsmith-stylus

Build Status Dependency Status

A Stylus plugin for Metalsmith.

Installation

npm install --save metalsmith-stylus

Getting Started

If you haven't checked out Metalsmith before, head over to their website and check out the documentation.

CLI Usage

If you are using the command-line version of Metalsmith, you can install via npm, and then add the metalsmith-stylus key to your metalsmith.json file:

{
  "plugins": {
    "metalsmith-stylus": {}
  }
}

JavaScript API

If you are using the JS Api for Metalsmith, then you can require the module and add it to your .use() directives:

var stylus = require('metalsmith-stylus');

metalsmith.use(stylus());

Options

All option keys will be passed to stylus' set method, except define and use.

To use stylus plug-ins like nib or autoprefixer, add them as array to use:

var stylus = require('metalsmith-stylus');
var nib = require('nib');

metalsmith.use(stylus({
	// Set stylus output to compressed
	compress: true,
	// Use the 'nib' plug-in
	use: [nib()],
	// Inline images as base64
	define: {
		url: stylus.url()
	}
}));

metalsmith-stylus's People

Contributors

esundahl avatar waxolunist avatar fhemberger avatar mikeal avatar

Watchers

Erik Kristensen avatar James Cloos avatar  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.