postcss-loader
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -5,2 +5,14 @@ # Change Log | ||
<a name="2.0.6"></a> | ||
## [2.0.6](https://github.com/postcss/postcss-loader/compare/v2.0.5...v2.0.6) (2017-06-14) | ||
### Bug Fixes | ||
* allow to pass an `{Object}` (`options.parser`) ([#257](https://github.com/postcss/postcss-loader/issues/257)) ([4974607](https://github.com/postcss/postcss-loader/commit/4974607)) | ||
* misspelling in warnings ([#237](https://github.com/postcss/postcss-loader/issues/237)) ([adcbb2e](https://github.com/postcss/postcss-loader/commit/adcbb2e)) | ||
* **index:** simplify config loading behaviour ([#259](https://github.com/postcss/postcss-loader/issues/259)) ([b313478](https://github.com/postcss/postcss-loader/commit/b313478)) | ||
<a name="2.0.5"></a> | ||
@@ -7,0 +19,0 @@ ## [2.0.5](https://github.com/postcss/postcss-loader/compare/v2.0.4...v2.0.5) (2017-05-10) |
@@ -50,39 +50,39 @@ 'use strict' | ||
const rc = { | ||
path: path.dirname(file), | ||
ctx: { | ||
file: { | ||
extname: path.extname(file), | ||
dirname: path.dirname(file), | ||
basename: path.basename(file) | ||
}, | ||
options: {} | ||
} | ||
} | ||
const sourceMap = options.sourceMap | ||
if (options.config) { | ||
if (options.config.path) { | ||
rc.path = path.resolve(options.config.path) | ||
Promise.resolve().then(() => { | ||
const length = Object.keys(options) | ||
.filter((option) => { | ||
// if (option === 'exec') return | ||
if (option === 'config') return | ||
if (option === 'sourceMap') return | ||
return option | ||
}) | ||
.length | ||
if (length) { | ||
return parseOptions.call(this, options) | ||
} | ||
if (options.config.ctx) { | ||
rc.ctx.options = options.config.ctx | ||
const rc = { | ||
path: path.dirname(file), | ||
ctx: { | ||
file: { | ||
extname: path.extname(file), | ||
dirname: path.dirname(file), | ||
basename: path.basename(file) | ||
}, | ||
options: {} | ||
} | ||
} | ||
} | ||
const sourceMap = options.sourceMap | ||
if (options.config) { | ||
if (options.config.path) { | ||
rc.path = path.resolve(options.config.path) | ||
} | ||
Promise.resolve().then(() => { | ||
const length = Object.keys(options).length | ||
// TODO | ||
// Refactor | ||
if (!options.config && !sourceMap && length) { | ||
return parseOptions.call(this, options) | ||
} else if (options.config && !sourceMap && length > 1) { | ||
return parseOptions.call(this, options) | ||
} else if (!options.config && sourceMap && length > 1) { | ||
return parseOptions.call(this, options) | ||
} else if (options.config && sourceMap && length > 2) { | ||
return parseOptions.call(this, options) | ||
if (options.config.ctx) { | ||
rc.ctx.options = options.config.ctx | ||
} | ||
} | ||
@@ -132,3 +132,3 @@ | ||
if (!sourceMap && map) { | ||
this.emitWarning(`\n\n ⚠️ PostCSS Loader\n\nPrevious source map found, but options.sourceMap isn't set.\nIn this case the loader will discard the source map enterily for performance reasons.\nSee https://github.com/postcss/postcss-loader#sourcemap for more information.\n\n`) | ||
this.emitWarning(`\n\n ⚠️ PostCSS Loader\n\nPrevious source map found, but options.sourceMap isn't set.\nIn this case the loader will discard the source map entirely for performance reasons.\nSee https://github.com/postcss/postcss-loader#sourcemap for more information.\n\n`) | ||
} | ||
@@ -135,0 +135,0 @@ |
@@ -20,3 +20,3 @@ { | ||
"parser": { | ||
"type": "string" | ||
"type": [ "string", "object" ] | ||
}, | ||
@@ -23,0 +23,0 @@ "syntax": { |
{ | ||
"name": "postcss-loader", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "PostCSS loader for webpack", | ||
"main": "lib/index.js", | ||
"engines": { | ||
"node": ">=4" | ||
"node": ">= 4" | ||
}, | ||
"files": [ | ||
"lib", | ||
"index.js" | ||
"lib" | ||
], | ||
"dependencies": { | ||
"loader-utils": "^1.x", | ||
"postcss": "^6.x", | ||
"postcss-load-config": "^1.x", | ||
"schema-utils": "^0.x" | ||
"loader-utils": "^1.1.0", | ||
"postcss": "^6.0.2", | ||
"postcss-load-config": "^1.2.0", | ||
"schema-utils": "^0.3.0" | ||
}, | ||
"devDependencies": { | ||
"coveralls": "^2.x", | ||
"fs-extra": "^3.x", | ||
"jest": "^20.x", | ||
"jsdoc-to-markdown": "^3.x", | ||
"postcss-js": "^0.x", | ||
"standard": "^10.x", | ||
"standard-version": "^4.0.0", | ||
"sugarss": "^1.x", | ||
"webpack": "^2.x" | ||
"coveralls": "^2.13.1", | ||
"fs-extra": "^3.0.1", | ||
"jest": "^20.0.4", | ||
"jsdoc-to-markdown": "^3.0.0", | ||
"postcss-js": "^1.0.0", | ||
"standard": "^10.0.2", | ||
"standard-version": "^4.1.0", | ||
"sugarss": "^1.0.0", | ||
"webpack": "^2.6.1" | ||
}, | ||
@@ -56,4 +55,11 @@ "scripts": { | ||
"author": "Andrey Sitnik <andrey@sitnik.ru>", | ||
"repository": "postcss/postcss-loader", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/postcss/postcss-loader.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/postcss/postcss-loader/issues" | ||
}, | ||
"homepage": "https://github.com/postcss/postcss-loader#readme", | ||
"license": "MIT" | ||
} |
@@ -44,3 +44,3 @@ [![npm][npm]][npm-url] | ||
'postcss-import': {}, | ||
'cssnext': {}, | ||
'postcss-cssnext': {}, | ||
'autoprefixer': {}, | ||
@@ -208,3 +208,3 @@ 'cssnano': {} | ||
require('postcss-import')({ root: loader.resourcePath }), | ||
require('cssnext')(), | ||
require('postcss-cssnext')(), | ||
require('autoprefixer')(), | ||
@@ -268,3 +268,3 @@ require('cssnano')() | ||
> :warning: If a previous loader like e.g `sass-loader` is applied and it's `sourceMap` option is set, but the `sourceMap` option in `postcss-loader` is omitted, previous source maps will be discarded by `postcss-loader` **enterily**. | ||
> :warning: If a previous loader like e.g `sass-loader` is applied and it's `sourceMap` option is set, but the `sourceMap` option in `postcss-loader` is omitted, previous source maps will be discarded by `postcss-loader` **entirely**. | ||
@@ -342,3 +342,3 @@ **webpack.config.js** | ||
'style-loader', | ||
{ loader: 'css-loader' options: { modules: true, importLoaders: 1 } }, | ||
{ loader: 'css-loader', options: { modules: true, importLoaders: 1 } }, | ||
'postcss-loader' | ||
@@ -345,0 +345,0 @@ ] |
25071
216
+ Addedajv@5.5.2(transitive)
+ Addedco@4.6.0(transitive)
+ Addedfast-deep-equal@1.1.0(transitive)
+ Addedjson-schema-traverse@0.3.1(transitive)
+ Addedschema-utils@0.3.0(transitive)
- Removedajv@6.12.6(transitive)
- Removedajv-keywords@3.5.2(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedschema-utils@0.4.7(transitive)
- Removeduri-js@4.4.1(transitive)
Updatedloader-utils@^1.1.0
Updatedpostcss@^6.0.2
Updatedpostcss-load-config@^1.2.0
Updatedschema-utils@^0.3.0