postcss-loader
Advanced tools
Comparing version 0.7.0 to 0.8.0
@@ -0,1 +1,4 @@ | ||
## 0.8 | ||
* Add postcss-js support (by Simon Degraeve). | ||
## 0.7 | ||
@@ -2,0 +5,0 @@ * Added argument with webpack instance to plugins callback (by Maxime Thirouin). |
@@ -42,2 +42,6 @@ var loaderUtils = require('loader-utils'); | ||
if ( params.parser === 'postcss-js' ) { | ||
source = this.exec(source, this.resource); | ||
} | ||
postcss(plugins) | ||
@@ -44,0 +48,0 @@ .process(source, opts).then(function (result) { |
{ | ||
"name": "postcss-loader", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "PostCSS loader for webpack", | ||
@@ -14,3 +14,3 @@ "keywords": ["webpack", "loader", "css", "postcss", "postcss-runner"], | ||
"loader-utils": "^0.2.11", | ||
"postcss": "^5.0.10" | ||
"postcss": "^5.0.11" | ||
}, | ||
@@ -23,4 +23,5 @@ "devDependencies": { | ||
"raw-loader": "0.5.1", | ||
"fs-extra": "0.24.0", | ||
"chai": "3.3.0", | ||
"postcss-js": "0.1.0", | ||
"fs-extra": "0.26.2", | ||
"chai": "3.4.1", | ||
"gulp": "3.9.0" | ||
@@ -27,0 +28,0 @@ }, |
@@ -126,2 +126,27 @@ # PostCSS for Webpack [![Build Status][ci-img]][ci] | ||
## JS Styles | ||
If you want to process styles written in JavaScript | ||
you can use the [postcss-js] parser. | ||
```js | ||
{ | ||
test: /\.style.js$/, | ||
loader: "style-loader!css-loader!postcss-loader?parser=postcss-js" | ||
// Or using Babel | ||
// loader: "style-loader!css-loader!postcss-loader?parser=postcss-js!babel" | ||
} | ||
``` | ||
Or use can use even ES6 in JS styles by Babel: | ||
```js | ||
{ | ||
test: /\.style.js$/, | ||
loader: "style-loader!css-loader!postcss-loader?parser=postcss-js!babel" | ||
} | ||
``` | ||
[postcss-js]: https://github.com/postcss/postcss-js | ||
## Custom Syntaxes | ||
@@ -128,0 +153,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14119
51
167
9
Updatedpostcss@^5.0.11