Skip to content

Using stylus sourcemaps with nib #265

Open
@ryanmunger

Description

@ryanmunger

Currently I am using nib as follows:

var express = require("express"),
    path = require("path"),
    stylus = require("stylus"),
    nib = require("nib");

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

app.use(stylus.middleware({
  src: __dirname + '/public',
  compile: compile,
  sourcemaps: true
}));

app.use(express.static(path.join(__dirname, "public")));

I have sourcemaps set to true, and stylus works fine without the call to nib. However, once I add nib, the sourcemaps seem to stop working. Any ideas on this? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions