Socket
Socket
Sign inDemoInstall

karma-typescript-postcss-transform

Package Overview
Dependencies
11
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    karma-typescript-postcss-transform

PostCSS runner plugin


Version published
Weekly downloads
335
increased by7.72%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

karma-typescript-postcss-transform

Npm Version Travis Status Appveyor Status

Karma-Typescript :heart: PostCSS

This plugin is a generic PostCSS runner, which transforms CSS with JavaScript on the fly when running tests with karma-typescript.

Installation

$ npm install --save-dev karma-typescript-postcss-transform

Configuration

In the karma-typescript section of karma.conf.js:

karmaTypescriptConfig: {
    bundlerOptions: {
        transforms: [
            require("karma-typescript-postcss-transform")([require("some-plugin")])
        ]
    }
}

Options

Custom options can be passed to the runner in the first argument when calling the plugin:

  • An array of PostCSS plugins
  • PostCSS options. Optional, but the properties to and from are always set to the filename of the CSS file automatically.
  • A RegExp object to filter which files should be processed.
    Optional, defaults to /\.css$/.

An example using the plugin autoprefixer with inline sourcemaps and a RegExp filter:

karmaTypescriptConfig: {
    bundlerOptions: {
        transforms: [
            require("karma-typescript-postcss-transform")(
                [require("autoprefixer")], { map: { inline: true } }, /\.css$/
            )
        ]
    }
}

Licensing

This software is licensed with the MIT license.

© 2016-2021 Erik Barke, Monounity

Keywords

FAQs

Last updated on 01 May 2023

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