@goodthnx/metalsmith-postcss
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Metalsmith PostCSS

PostCSS integration for Metalsmith.

Key features

  • loading postcss.config.js files
  • target rewriting (.sss -> .css)
  • unit tests

Usage

const postcss = require('metalsmith-postcss')

new Metalsmith(__dirname)
.use(postcss({
    pattern: '**/*.{sss,css}',
    config: './postcss.config.js',
    // 'config' AND/OR inline (these will override config file settings)
    plugins: {
        'postcss-preset-env': {stage: 1},
        ...
    },
    map: {inline: true},
}))
.build(err => {
    if (err) throw err;
})

Notes

I wrote this plugin because I wasn't getting what I wanted from existing solutions. In a mindless coding rage I ended up with this.

Perhaps later when I'm feeling more bold, a pull-request into metalsmith-postcss would be more appropriate.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    3
  • 1.0.0
    2

Package Sidebar

Install

npm i @goodthnx/metalsmith-postcss

Weekly Downloads

5

Version

1.1.0

License

MIT

Unpacked Size

15.3 kB

Total Files

6

Last publish

Collaborators

  • gwillz