node package manager

postcss-rm-imports

remove or comment out @import statements

postcss-rm-imports

NPM version build status Test coverage Gittip

Comments out or removes @import statements. Useful for build processes.

Installation

npm install postcss-rm-imports

Usage

var postcss = require("postcss")
var rmImports = require("postcss-rm-imports")
 
var css = postcss()
  .use(rmImports({
    remove: false
  }))
  .process(cssString)
  .css

Options

By default, it will simply comment-out @import statements. If you would like it to remove the @import statements, set remove: true as an option.