postcss-loader
Advanced tools
Comparing version 2.0.6 to 2.0.7
@@ -5,2 +5,13 @@ # Change Log | ||
<a name="2.0.7"></a> | ||
## [2.0.7](https://github.com/postcss/postcss-loader/compare/v2.0.6...v2.0.7) (2017-10-10) | ||
### Bug Fixes | ||
* sanitizing `from` and `to` options (`postcss.config.js`) ([#260](https://github.com/postcss/postcss-loader/issues/260)) ([753dea7](https://github.com/postcss/postcss-loader/commit/753dea7)) | ||
* **index:** runaway promise ([#269](https://github.com/postcss/postcss-loader/issues/269)) ([8df20ce](https://github.com/postcss/postcss-loader/commit/8df20ce)) | ||
<a name="2.0.6"></a> | ||
@@ -7,0 +18,0 @@ ## [2.0.6](https://github.com/postcss/postcss-loader/compare/v2.0.5...v2.0.6) (2017-06-14) |
@@ -43,5 +43,2 @@ 'use strict' | ||
module.exports = function loader (css, map) { | ||
const cb = this.async() | ||
const file = this.resourcePath | ||
const options = loaderUtils.getOptions(this) || {} | ||
@@ -51,2 +48,5 @@ | ||
const cb = this.async() | ||
const file = this.resourcePath | ||
const sourceMap = options.sourceMap | ||
@@ -97,2 +97,7 @@ | ||
// Disable override `to` option from `postcss.config.js` | ||
if (config.options.to) delete config.options.to | ||
// Disable override `from` option from `postcss.config.js` | ||
if (config.options.from) delete config.options.from | ||
let plugins = config.plugins || [] | ||
@@ -166,3 +171,5 @@ let options = Object.assign({ | ||
*/ | ||
return cb(null, `module.exports = ${JSON.stringify(css)}`, map) | ||
cb(null, `module.exports = ${JSON.stringify(css)}`, map) | ||
return null | ||
} | ||
@@ -177,3 +184,5 @@ /** | ||
*/ | ||
return cb(null, css, map) | ||
cb(null, css, map) | ||
return null | ||
}) | ||
@@ -180,0 +189,0 @@ }).catch((err) => { |
{ | ||
"name": "postcss-loader", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"description": "PostCSS loader for webpack", | ||
@@ -14,3 +14,3 @@ "main": "lib/index.js", | ||
"loader-utils": "^1.1.0", | ||
"postcss": "^6.0.2", | ||
"postcss": "^6.0.0", | ||
"postcss-load-config": "^1.2.0", | ||
@@ -20,22 +20,26 @@ "schema-utils": "^0.3.0" | ||
"devDependencies": { | ||
"coveralls": "^2.13.1", | ||
"fs-extra": "^3.0.1", | ||
"jest": "^20.0.4", | ||
"coveralls": "^2.0.0", | ||
"jest": "^21.0.0", | ||
"jsdoc-to-markdown": "^3.0.0", | ||
"memory-fs": "^0.4.0", | ||
"postcss-js": "^1.0.0", | ||
"standard": "^10.0.2", | ||
"standard-version": "^4.1.0", | ||
"standard": "^10.0.0", | ||
"standard-version": "^4.0.0", | ||
"sugarss": "^1.0.0", | ||
"webpack": "^2.6.1" | ||
"webpack": "^3.0.0" | ||
}, | ||
"scripts": { | ||
"clean": "rm -rf dmd jsdoc-api jest_0 coverage test/builds", | ||
"clean": "rm -rf dmd jest* coverage jsdoc-api test/results", | ||
"lint": "standard", | ||
"docs": "jsdoc2md lib/index.js > LOADER.md", | ||
"pretest": "npm run lint && npm run test:build", | ||
"test": "jest", | ||
"test:build": "node test/webpack.build.js", | ||
"posttest": "npm run clean", | ||
"postdocs": "npm run clean", | ||
"pretest": "npm run clean", | ||
"test": "jest --verbose --coverage", | ||
"release": "standard-version" | ||
}, | ||
"jest": { | ||
"collectCoverageFrom": [ | ||
"lib/*.js" | ||
] | ||
}, | ||
"standard": { | ||
@@ -57,11 +61,6 @@ "env": { | ||
"author": "Andrey Sitnik <andrey@sitnik.ru>", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/postcss/postcss-loader.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/postcss/postcss-loader/issues" | ||
}, | ||
"repository": "https://github.com/postcss/postcss-loader.git", | ||
"bugs": "https://github.com/postcss/postcss-loader/issues", | ||
"homepage": "https://github.com/postcss/postcss-loader#readme", | ||
"license": "MIT" | ||
} |
@@ -5,6 +5,5 @@ [![npm][npm]][npm-url] | ||
[![tests][tests]][tests-url] | ||
[![coverage][cover]][cover-url] | ||
[![chat][chat]][chat-url] | ||
<!-- [![coverage][cover]][cover-url] --> | ||
<div align="center"> | ||
@@ -25,10 +24,9 @@ <img width="180" height="180" hspace="10" | ||
<h1>PostCSS Loader</h1> | ||
<p>Loader for <a href="http://webpack.js.org/">webpack</a> to process CSS with <a href="http://postcss.org/">PostCSS</a></p> | ||
</div> | ||
<!-- <p>Loader for <a href="http://webpack.js.org/">webpack</a> to process CSS with <a href="http://postcss.org/">PostCSS</a></p> --> | ||
<h2 align="center">Install</h2> | ||
```bash | ||
npm i -D postcss-loader | ||
npm i -D postcss-loader | ||
``` | ||
@@ -47,3 +45,2 @@ | ||
'postcss-cssnext': {}, | ||
'autoprefixer': {}, | ||
'cssnano': {} | ||
@@ -188,3 +185,3 @@ } | ||
{ | ||
loader: 'postcss-loader' | ||
loader: 'postcss-loader', | ||
options: { | ||
@@ -209,2 +206,3 @@ config: { | ||
options: { | ||
ident: 'postcss', | ||
plugins: (loader) => [ | ||
@@ -220,2 +218,4 @@ require('postcss-import')({ root: loader.resourcePath }), | ||
> ⚠️ webpack requires an identifier (`ident`) in `options` when `{Function}/require` is used (Complex Options). The `ident` can be freely named as long as it is unique. It's recommended to name it (`ident: 'postcss'`) | ||
### `Syntaxes` | ||
@@ -322,2 +322,3 @@ | ||
options: { | ||
ident: 'postcss', | ||
plugins: [ | ||
@@ -324,0 +325,0 @@ require('postcss-import')(), |
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
26018
222
464
1
4
Updatedpostcss@^6.0.0