Comparing version 0.10.1 to 0.11.0
@@ -0,1 +1,16 @@ | ||
<a name="0.11.0"></a> | ||
# [0.11.0](https://github.com/posthtml/posthtml/compare/v0.10.1...v0.11.0) (2017-12-12) | ||
### Bug Fixes | ||
* **readme:** typo in webpack config, close [#222](https://github.com/posthtml/posthtml/issues/222) ([92b0261](https://github.com/posthtml/posthtml/commit/92b0261)) | ||
### Features | ||
* **index:** add support for `messages` (`result.messages`) ([e38bb9b](https://github.com/posthtml/posthtml/commit/e38bb9b)) | ||
<a name="0.10.1"></a> | ||
@@ -2,0 +17,0 @@ ## [0.10.1](https://github.com/posthtml/posthtml/compare/v0.10.0...v0.10.1) (2017-11-24) |
@@ -85,3 +85,25 @@ 'use strict' | ||
}) | ||
} | ||
}, | ||
/** | ||
* plugin messages to store and pass metadata | ||
* | ||
* @memberof tree | ||
* @type {Array} messages | ||
* | ||
***Usage** | ||
* ```js | ||
* export default function plugin (options = {}) { | ||
* return function (tree) { | ||
* tree.messages.push({ | ||
* type: 'dependency', | ||
* file: 'path/to/dependency.html', | ||
* from: tree.options.from | ||
* }) | ||
* | ||
* return tree | ||
* } | ||
* } | ||
* ``` | ||
*/ | ||
messages: [] | ||
} | ||
@@ -88,0 +110,0 @@ |
@@ -155,4 +155,5 @@ var pkg = require('../package.json') | ||
return plugin(result) | ||
}, function (err) { | ||
return err | ||
}, function (e) { | ||
err = e | ||
return e | ||
}) | ||
@@ -239,2 +240,3 @@ | ||
tree.match = api.match | ||
tree.messages = api.messages | ||
} | ||
@@ -256,4 +258,5 @@ | ||
}, | ||
tree: tree | ||
tree: tree, | ||
messages: tree.messages | ||
} | ||
} |
{ | ||
"name": "posthtml", | ||
"version": "0.10.1", | ||
"version": "0.11.0", | ||
"description": "HTML/XML processor", | ||
@@ -17,2 +17,5 @@ "keywords": [ | ||
"main": "lib", | ||
"files": [ | ||
"lib" | ||
], | ||
"engines": { | ||
@@ -19,0 +22,0 @@ "node": ">=0.10.0" |
@@ -236,11 +236,9 @@ [![NPM][npm]][npm-url] | ||
] | ||
} | ||
posthtml: (ctx) => { | ||
return { | ||
parser: require('posthtml-pug') | ||
}, | ||
posthtml: (ctx) => ({ | ||
parser: require('posthtml-pug'), | ||
plugins: [ | ||
require('posthtml-include')({ root: ctx.resourcePath }) | ||
require('posthtml-bem')() | ||
] | ||
} | ||
} | ||
}) | ||
} | ||
@@ -264,16 +262,23 @@ | ||
use: [ | ||
{ loader: 'html-loader', options: { minimize: true } } | ||
'posthtml-loader' | ||
{ | ||
loader: 'html-loader', | ||
options: { minimize: true } | ||
}, | ||
{ | ||
loader: 'posthtml-loader' | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
plugins: [ | ||
new LoaderOptionsPlugin({ | ||
options: { | ||
posthtml (ctx) { | ||
parser: require('posthtml-pug') | ||
plugins: [ | ||
require('posthtml-include')({ root: ctx.resourcePath }) | ||
] | ||
posthtml(ctx) { | ||
return { | ||
parser: require('posthtml-pug'), | ||
plugins: [ | ||
require('posthtml-bem')() | ||
] | ||
} | ||
} | ||
@@ -383,3 +388,8 @@ } | ||
|[posthtml-web-component][web]|[![npm][web-badge]][web-npm]|Web Component server-side rendering, Component as a Service (CaaS)| | ||
|[posthtml-spaceless][spaceless]|[![npm][spaceless-badge]][spaceless-npm]|Remove whitespace between HTML tags| | ||
[spaceless]: https://github.com/posthtml/posthtml-spaceless | ||
[spaceless-badge]: https://img.shields.io/npm/v/posthtml-spaceless.svg | ||
[spaceless-npm]: https://npmjs.com/package/posthtml-spaceless | ||
[doctype]: https://github.com/posthtml/posthtml-doctype | ||
@@ -386,0 +396,0 @@ [doctype-badge]: https://img.shields.io/npm/v/posthtml-doctype.svg |
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
378
733
48756
6