@minna-ui/postcss-config
TypeScript icon, indicating that this package has built-in type declarations

0.36.0 • Public • Published

NPM version Licence

@minna-ui/postcss-config

PostCSS config preset for use in Minna UI projects or standalone.

Included plugins (in execution order):

Plugin Docs Notes
postcss-advanced-variables link
postcss-use link
postcss-nested link
postcss-color-mod-function link
css-mqpacker link (optimize only)
autoprefixer link (optimize only)
cssnano link (optimize only)

Usage

  1. Install this package and its dependencies:

    yarn add -D @minna-ui/postcss-config postcss postcss-scss
  2. Create a postcss.config.js file in your project root with this package as a plugin:

    module.exports = {
      map: true,
      plugins: {
        // the `unsafe` option is fine when compiling components separately, it
        // only becomes potentially dangerous when compiling a whole app
        '@minna-ui/postcss-config': { unsafe: true },
      },
      syntax: 'postcss-scss',
    };
  3. CSS is automatically transformed with our preset PostCSS plugins, but if you need extra functionality, you can specify PostCSS plugins directly in your CSS using @use (after first installing the plugin):

    @use postcss-extend-rule();
    
    .navbar-icon {
      @extend .icon;
    }

Options

Option Default value Type Description
importAlias { '^##\\/(.*)$': 'src/$1' } object A map of import aliases. Given a matching regex key, will replace the import path with the value.
importPaths [process.cwd(), 'src', 'src/css'] array A list of extra paths to search when resolving @import rules in CSS. First, imports will try to resolve according to the CSS Import Resolve spec and then try again with each of the importPaths.
optimize process.env.NODE_ENV === 'production' boolean Perform optimisations to reduce output file size and minimise runtime style computation.
unsafe false boolean Apply potentially unsafe transformations (e.g. combining same @media).
debug true boolean Show useful debugging feedback (e.g. unresolved variables).
...options undefined any Any other options will be passed to all PostCSS plugins and to the nanocss preset options.This can be particuarly powerful if you need to pass options when using the @use rule — use the plugin name as a key, as shown in the postcss-use docs.

Licence

@minna-ui/postcss-config is part of Minna UI, an Apache-2.0 licensed open source project. See LICENCE.


© 2020 We Are Genki

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.36.1-next.570next
0.36.00latest
0.22.1-beta.20beta

Version History

VersionDownloads (Last 7 Days)Published
0.36.1-next.570
0.36.00
0.35.2-next.580
0.35.2-next.350
0.35.2-next.301
0.36.0-next.240
0.35.00
0.34.00
0.33.00
0.32.00
0.31.00
0.30.00
0.29.00
0.28.00
0.27.00
0.26.00
0.25.00
0.24.00
0.23.00
0.22.10
0.22.1-beta.20
0.22.1-beta.00
0.22.0-beta.00
0.22.0-next.230
0.22.0-next.200
0.22.0-next.120
0.22.0-next.3320
0.22.0-next.3310
0.22.0-next.3250
0.22.0-next.3071
0.22.0-next.2980
0.22.0-next.2880
0.22.0-next.2741
0.22.0-next.2660
0.22.0-next.2650
0.22.0-next.2620
0.22.0-next.2600
0.22.0-next.2350
0.22.0-next.2280
0.22.0-next.1930
0.22.0-next.1900
0.22.0-next.770
0.21.00
0.20.00
0.19.01
0.18.10
0.18.00
0.17.00
0.16.00
0.15.01
0.13.00
0.12.00
0.11.10
0.11.00
0.10.00
0.9.00
0.8.00
0.7.00
0.5.00
0.4.00
0.3.00
0.2.00
0.1.00
0.0.00

Package Sidebar

Install

npm i @minna-ui/postcss-config

Weekly Downloads

5

Version

0.36.0

License

Apache-2.0

Unpacked Size

32.9 kB

Total Files

12

Last publish

Collaborators

  • maxmilton