Socket
Book a DemoInstallSign in
Socket

css-combine

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-combine

A module that combines CSS files by resolving @import directives.

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

css-combine

css-combine is a module/command-line utility that combines CSS files by resolving their @import directives.

Build status

Install

$ npm install [-g] css-combine

Usage

cli

$ css-combine /path/to/file > /path/to/build

module

var combine = require('css-combine')

var raw = '/path/to/file'
/*
  @import 'one.css';
  @import url(two.css);
  @import url('/path/to/three.css');
  @import "../to/four.css";
  @import url("five.css");
  @import url(https://resolves-external-files.too);

  body:before {
    content: 'Just regular CSS'
  }
*/

combine(raw).pipe(
  fs.createWriteStream('/path/to/build')
)

Note

If your @import directives use absolute file-system paths (like three.css in the above example), make sure you run css-combine from the root directory so that everything resolves correctly.

License

MIT

Keywords

css

FAQs

Package last updated on 03 Mar 2016

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