Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Latest commit

 

History

History

plugin-lib-postcss

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

🏭 plugin-lib-postcss

npm linux windows coverage deps

Transform files using PostCSS.

Install

$ yarn add --dev @start/plugin-lib-postcss
# or
$ npm install --save-dev @start/plugin-lib-postcss

Usage

Signature

postcss(options?: {})

options

  • plugins – an array of PostCSS plugins
  • sourceMaps – boolean whether to process source maps or not
  • parser, stringifier, syntaxPostCSS options

Example

import sequence from '@start/plugin-sequence'
import find from '@start/plugin-find'
import read from '@start/plugin-read'
import postcss from '@start/plugin-lib-postcss'
import write from '@start/plugin-write'

import autoprefixer from 'autoprefixer'

export const task = () =>
  sequence(
    find('src/**/*.css'),
    read,
    postcss({
      plugins: [autoprefixer],
      sourceMaps: true
    }),
    write('build/')
  )