Socket
Socket
Sign inDemoInstall

piping-styles

Package Overview
Dependencies
5
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    piping-styles

Keep your styles piping hot! Rebuild your styles on change without binaries


Version published
Weekly downloads
0
Maintainers
1
Install size
836 kB
Created
Weekly downloads
 

Readme

Source

Piping-styles

Similar stuff to piping and piping-browser but for stylesheets. currently supports stylus with (optional) nib.

Installation

npm install piping-styles

Usage

Piping-styles is not a binary, so you can continue using your current workflow for running your application ("wooo!"). Basic usage is as follows:

require("piping-styles")({main:"./client/styles/app.styl",out:"./public/app.css"});

Options

  • main (path): The path to your top style
  • out (path): The path to where you want your css to be written to. Relative to the file where piping-styles was required
  • ignore (regex): Files/paths matching this regex will not be watched. Defaults to /(\/\.|~$)/
  • minify (boolean): Whether to minify all css output. Defaults to false
  • watch (boolean): Whether or not piping should rebuild on changes. Defaults to true, could be set to false for production
  • includeModules (boolean): Whether to include files located in node_modules folders when watching. defaults to false
  • vendor (object): Specify configuration for building vendor files. Vendor files are concatenated in order, and written to the given path.
    • path (string): Directory where vendor files are located, relative to file where piping-styles was required
    • out (string): Path where vendor ouput should be written, relative to the file where piping-styles was required
    • files (array): Array of vendor files, relative to vendor path.
  • build (object): An object that maps file extensions, eg ".styl" to functions that take a filename, file data, and a callback and compile the source, sending it to the callback.

Piping-styles can also be used just by passing two strings. In this case, the strings are taken as the main and out options

require("piping-styles")("./client/styles/app.styl","./public/app.css");

piping-styles plays nice with piping. To use it, ensure piping-styles is required when piping returns false:

if(!require("piping")()){
  require("piping-styles")("./client/styles/app.styl","./public/app.css");
  return;
}
// application logic here

Keywords

FAQs

Last updated on 24 Mar 2013

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc