Home

Awesome

stylus-lookup

CI npm version npm downloads

Get the file associated with a Stylus import

This module replaces the Stylus compiler's lookup algorithm for resolving a partial's path.

Originally built for Dependents

Usage

const stylusLookup = require('stylus-lookup');

stylusLookup({
  dependency: 'foo',
  filename: 'path/to/file',
  directory: 'path/to/all/files'
});

Example:

const stylusLookup = require('stylus-lookup');

stylusLookup({
  dependency: 'variables',
  filename: 'app/styles/styles.styl',
  directory: 'app/styles'
}); // yields app/styles/variables.styl

CLI

Assumes a global install of stylus-lookup with npm install -g stylus-lookup

stylus-lookup [options] path/to/file

Run stylus-lookup --help to see all the options.

License

MIT