Socket
Socket
Sign inDemoInstall

css-extract

Package Overview
Dependencies
61
Maintainers
7
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    css-extract

Extract CSS from a browserify bundle


Version published
Weekly downloads
149
increased by26.27%
Maintainers
7
Install size
6.14 MB
Created
Weekly downloads
 

Changelog

Source

2.0.0

  • Update dependencies. ([@goto-bus-stop][] in [#16][])
  • Add test for insertCss(someDynamicValue). ([@ahdinosaur][] in [#12][])

Readme

Source

css-extract stability

npm version build status test coverage downloads js-standard-style

Looks up require('insert-css') calls to extract CSS from a browserify bundle to a file. Useful with sheetify or any other package / transform that uses insert-css.

Command line

$ browserify -t sheetify/transform -p [ css-extract -o bundle.css ] index.js \
  -o bundle.js

JS api

const browserify = require('browserify')

browserify()
  .transform('sheetify/transform')
  .plugin('css-extract', { out: 'bundle.css' })
  .bundle()
const browserify = require('browserify')

browserify()
  .transform('sheetify/transform')
  .plugin('css-extract', { out: createWriteStream })
  .bundle()

function createWriteStream () {
  return process.stdout
}

Options

  • -o / --out: specify an outfile, defaults to bundle.css. Can also be a function that returns a writable stream from the JavaScript API.

Installation

$ npm install css-extract

See Also

License

MIT

Keywords

FAQs

Last updated on 06 Aug 2020

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