1.1.0 • Published 8 years ago

stylus-import-if-exist v1.1.0

Weekly downloads
99
License
MIT
Repository
github
Last release
8 years ago

Stylus Import If Exist

Build Status Coverage Status Dependency Status

Stylus fail build when you try import file which not exist. In some cases it's bad behavior. This plugin solve this problem.

Installation

You can install through npm as such: npm install stylus-import-if-exist

Usage

You can include stylus-import-if-exist as a normal stylus plugin. Example:

var stylus = require('stylus');
var importIfExist = require('stylus-import-if-exist');

stylus(css)
  .use(importIfExist())
  .render(function(err, output){
    console.log(output);
  });

You should replace all your @import with import(). For example, instead use @import 'example' you should use import(example). If file exist, it will be imported; if not  – nothing will happen.

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago