4.3.0 • Published 5 years ago

postcss-preset-moxy v4.3.0

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

postcss-preset-moxy

NPM version Downloads Build Status Coverage Status Dependency status Dev Dependency status

PostCSS preset to be used at MOXY.

Installation

$ npm install postcss-preset-moxy --save-dev

You might need to also install postcss-cli as a dev dependency.

Motivation

If you are developing a project that uses new CSS language features and must work on targets that do not yet support them, you have to transpile your styles. This preset provides a shareable PostCSS config as a preset that should be used across those projects at MOXY.

Usage

Create postcss.config.js at the root of your project:

module.exports = require('postcss-preset-moxy')();

...or with options

module.exports = require('postcss-preset-moxy')({
    import: { path: './src/styles' },
    mixins: { mixinsDir: './src/styles/mixins' },
});

Available options:

NameDescriptionTypeDefault
importOptions to pass to postcss-importObjectundefined
mixinsOptions to pass to postcss-mixinsObjectundefined
cssVariablesOptions to pass to postcss-css-variables, false disables the pluginObject/boolean{ preserveAtRulesOrder: true }
urlOptions to pass to postcss-url, false disables any transpilation of url() declarationsArray/Object/boolean{ url: 'rebase' }
browsersSupported browsers list to pass to postcss-cssnextArraybrowserslist-config-google

The postcss-url plugin is enabled by default. You may disable it like so:

module.exports = require('postcss-preset-moxy')({
    url: false,
});

Tests

$ npm test
$ npm test -- --watch during development

License

MIT License

4.3.0

5 years ago

4.2.0

5 years ago

4.1.2

5 years ago

4.1.1

5 years ago

4.1.0

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.0.0

5 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.0

6 years ago

2.1.1

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.3.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

2.1.0

6 years ago