Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-loader

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-loader - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## 0.8.1
* Fix resource path.
## 0.8

@@ -2,0 +5,0 @@ * Add postcss-js support (by Simon Degraeve).

4

index.js

@@ -7,4 +7,4 @@ var loaderUtils = require('loader-utils');

var file = loaderUtils.getRemainingRequest(this);
var params = loaderUtils.parseQuery(this.query);
var file = this.resourcePath;
var params = loaderUtils.parseQuery(this.query);

@@ -11,0 +11,0 @@ var opts = {

{
"name": "postcss-loader",
"version": "0.8.0",
"version": "0.8.1",
"description": "PostCSS loader for webpack",

@@ -8,20 +8,19 @@ "keywords": ["webpack", "loader", "css", "postcss", "postcss-runner"],

"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/postcss/postcss-loader.git"
},
"repository": "postcss-loader",
"dependencies": {
"loader-utils": "^0.2.11",
"postcss": "^5.0.11"
"loader-utils": "^0.2.12",
"postcss": "^5.0.15"
},
"devDependencies": {
"postcss-safe-parser": "1.0.1",
"webpack-stream": "2.1.1",
"gulp-eslint": "1.0.0",
"gulp-mocha": "2.1.3",
"raw-loader": "0.5.1",
"postcss-js": "0.1.0",
"fs-extra": "0.26.2",
"chai": "3.4.1",
"gulp": "3.9.0"
"eslint-config-postcss": "2.0.0",
"postcss-safe-parser": "1.0.4",
"webpack-stream": "3.1.0",
"gulp-eslint": "2.0.0",
"json-loader": "0.5.4",
"raw-loader": "0.5.1",
"postcss-js": "0.1.1",
"gulp-mocha": "2.2.0",
"fs-extra": "0.26.5",
"chai": "3.5.0",
"gulp": "3.9.1"
},

@@ -28,0 +27,0 @@ "scripts": {

@@ -25,3 +25,3 @@ # PostCSS for Webpack [![Build Status][ci-img]][ci]

var autoprefixer = require('autoprefixer');
var precss = require('precss');
var precss = require('precss');

@@ -127,2 +127,22 @@ module.exports = {

## Integration with CSS Modules
`postcss-loader` [cannot be used] with [CSS Modules] out of the box due
to the way `css-loader` processes file imports. To make them work properly,
either add the css-loader’s [`importLoaders` option]:
```js
{
test: /\.css$/,
loader: "style-loader!css-loader?modules&importLoaders=1!postcss-loader"
}
```
or replace `css-loader` with [postcss-modules] plugin.
[`importLoaders` option]: https://github.com/webpack/css-loader#importing-and-chained-loaders
[postcss-modules]: https://github.com/outpunk/postcss-modules
[cannot be used]: https://github.com/webpack/css-loader/issues/137
[CSS Modules]: https://github.com/webpack/css-loader#css-modules
## JS Styles

@@ -137,4 +157,2 @@

loader: "style-loader!css-loader!postcss-loader?parser=postcss-js"
// Or using Babel
// loader: "style-loader!css-loader!postcss-loader?parser=postcss-js!babel"
}

@@ -152,2 +170,18 @@ ```

As result you will be able to write styles as:
```js
import colors from '../config/colors';
export default {
'.menu': {
color: colors.main,
height: 25,
'&_link': {
color: 'white'
}
}
}
```
[postcss-js]: https://github.com/postcss/postcss-js

@@ -154,0 +188,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc