Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-esplit

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-esplit

PostCSS plugin for splitting css into multiple css files with sourcemaps support for preventing limitation of shinny ie9

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
159
Maintainers
1
Weekly downloads
 
Created
Source

PostCSS eSplit Build Status

PostCSS plugin for splitting css into multiple css files with sourcemaps support for preventing limitation of shinny ie9.

/* Input example - style.css */
@charset "UTF-8";

.someClass {
    display: block;
}

@media (max-width: 768px) {
    p {
        color: red;
    }

    em {
        color: blue;
    }
}
/* Output example with maxSelectors = 2 */

/* style.css */
@charset "UTF-8";
@import url(style-0.css);

@media (max-width: 768px) {
    em {
        color: blue;
    }
}


/* style-0.css */
.someClass {
    display: block;
}

@media (max-width: 768px) {
    p {
        color: red;
    }
}

Install

npm install postcss-esplit --save

Usage

postcss([ require('postcss-esplit')(/*opts*/) ])

See PostCSS docs for examples for your environment.

Also, starting from version 0.0.2 there are no need to place the plugin in the end of the processor plugins list.

Options

  • maxSelectors {number=4000} count of selectors exceeding which css file should be separated
  • fileName {string=%original%-%i%} template for retrieving name of separated files
    • %original% {string} name of original file
    • %i% {number} index of separated file
  • fileNameStartIndex {number=0} separated files will receive generated name starting from this index
  • writeFiles {boolean=true} separated files should be written to the disk
  • writeSourceMaps {boolean=true} source maps of separated files should be written to the disk
  • writeImport {boolean=true} original css source should have import declaration for separated files
  • quiet {boolean-false} toggling console output

Keywords

FAQs

Package last updated on 05 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc