Socket
Book a DemoInstallSign in
Socket

postcss-fs-css

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-fs-css

A postcss-plugin for transforming your CSS to FirstSpirit compatible CSS

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Postcss FS CSS

A PostCSS-plugin transforming plain CSS to FirstSpirit compatible CSS

This plugin is highly inspired by the grunt-fscss plugin. It brings the functionality to PostCSS to integrate it within any workflow you like using PostCSS.

Setup

Install the plugin by typing npm install --save-dev postcss-fs-css. After that you cann use the plugin like any other PostCSS plugin.

Example:

const postcss = require('postcss');

postcss([
   require('postcss-fs-css')()
]);

Within the function-call you can pass a configuration object.

Configuration

The configuration is fairly easy. There are three options in the configuration object:

abs

Here you can simply add a string which is passed in the CMS_REF function as the abs argument.

cacheStrategy

When configuring the plugin to use the revision caching strategy there is a get-parameter with a FirstSpirit function generating a revision-id added.

fileMapping

This option is an object specifying a mapping between the files and the reference IDs within FirstSpirit CMS. The key is the name of the file, the value is either a string specifying the reference ID associated or an object with the reference and the corresponding abs.

Example:

const postcss = require('postcss');

postcss([
   require('postcss-fs-css')({
        'fonts/sample.woff': {
            referenceName: 'sample_1',
            abs: 'test'
        }
   })
]);

Keywords

css

FAQs

Package last updated on 04 Aug 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.