0.3.0 • Published 8 years ago

gobble-postcss v0.3.0

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

gobble-postcss

Post-process CSS files with gobble and postcss.

Installation

First, you need to have gobble installed - see the gobble readme for details. Then,

npm i -D gobble-postcss

Usage

var gobble = require( 'gobble' );
module.exports = gobble( 'src/styles' ).transform( 'postcss', {
  plugins: [
    require( 'postcss-import' ),
    require( 'autoprefixer-core', { browsers: [ 'last 2 versions' ] }),
    require( 'cssnano' )
  ],

  // if `src` is omitted, all CSS files will be processed. If you're
  // using `postcss-import`, that's probably not what you want. It
  // can be a glob pattern
  src: 'main.css',

  // `dest` can be a string if `src` is supplied and is *not* a glob
  // pattern. Otherwise it must be a function. If omitted, dest name
  // will be same is src name
  dest: function ( src ) {
    // e.g. main.css -> main.min.css
	return src.replace( '.css', '.min.css' );
  },

  // sourcemap options. `true` (default) means the sourcemap will
  // be inlined, `false` means no sourcemap
  map: false
});

License

MIT. Copyright 2015 Rich Harris

0.3.0

8 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago