Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

dzhiriki/stylus-import-if-exist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published