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

0.7.3 • Public • Published

PostCSS Basics

PostCSS plugin pack for quick project bootstrapping.

Intended for use with Vite, so postcss-modules and postcss-import are not included.

Plugins:

Usage

Step 1: Install plugin:

npm install --save-dev @samatech/postcss-basics

Step 2: Check your project for existing PostCSS config: postcss.config.js in the project root, "postcss" section in package.json or postcss in bundle config.

If you do not use PostCSS, first add it according to PostCSS docs.

Step 3: Add the plugin to plugins list (note the spread operator and the extra () after the import statement):

import postcssBasics from '@samatech/postcss-basics'
export default {
  plugins: [
    ...postcssBasics(),
  ],
};

This can be simplified if you are not using other plugins:

import postcssBasics from '@samatech/postcss-basics'
export default {
  plugins: postcssBasics(),
};

Options

TODO

  • Pass through options for plugins
  • Disable plugins

Call plugin function to set options:

import postcssBasics from '@samatech/postcss-basics'
postcssBasics()

Package Sidebar

Install

npm i @samatech/postcss-basics

Weekly Downloads

602

Version

0.7.3

License

MIT

Unpacked Size

7.76 kB

Total Files

9

Last publish

Collaborators

  • samatech