Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rtsao/babel-plugin-csjs-postcss
:electric_plug: Babel plugin for running PostCSS on CSJS at build time
https://github.com/rtsao/babel-plugin-csjs-postcss
Last synced: 16 days ago
JSON representation
:electric_plug: Babel plugin for running PostCSS on CSJS at build time
- Host: GitHub
- URL: https://github.com/rtsao/babel-plugin-csjs-postcss
- Owner: rtsao
- License: mit
- Created: 2016-02-20T07:39:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-15T21:09:12.000Z (about 8 years ago)
- Last Synced: 2024-10-24T22:49:32.777Z (20 days ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 28
- Watchers: 4
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# babel-plugin-csjs-postcss
[![build status][build-badge]][build-href]
[![dependencies status][deps-badge]][deps-href]Babel plugin for running [PostCSS](https://github.com/postcss/postcss) on [CSJS](https://github.com/rtsao/csjs) at build time
### [Autoprefixer](https://github.com/postcss/autoprefixer) example
```sh
npm i babel-plugin-csjs-postcss autoprefixer --save-dev
```**Before:**
```javascript
csjs`.foo {
transform: ${foo};
}`;
```**After:**
```javascript
csjs`.foo {
-webkit-transform: ${ foo };
transform: ${ foo };
}`;
```**.babelrc**
```
{
"plugins": [["csjs-postcss", {
"plugins": ["autoprefixer"]
}]]
}
```### Advanced Configuration
**.babelrc**
```
{
"plugins": [["csjs-postcss", {
"plugins": [["autoprefixer", {"browsers": ["last 2 versions"]}]]
}]]
}
```[build-badge]: https://travis-ci.org/rtsao/babel-plugin-csjs-postcss.svg?branch=master
[build-href]: https://travis-ci.org/rtsao/babel-plugin-csjs-postcss
[deps-badge]: https://david-dm.org/rtsao/babel-plugin-csjs-postcss.svg
[deps-href]: https://david-dm.org/rtsao/babel-plugin-csjs-postcss