Skip to content

Commit

Permalink
Merge pull request #40 from posthtml/milestone-0.11.2
Browse files Browse the repository at this point in the history
Milestone 0.11.2
  • Loading branch information
Scrum committed Jun 3, 2016
2 parents 44a95d1 + 054a304 commit 2fb3d73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "posthtml-load-plugins",
"version": "0.11.1",
"version": "0.11.2",
"description": "Autoload Plugins for PostHTML",
"engines": {
"node": ">=6"
Expand Down Expand Up @@ -38,6 +38,7 @@
"posthtml-each": "^1.0.1",
"posthtml-include": "^1.1.0",
"posthtml-modules": "^0.1.1",
"posthtml-standard-config": "0.0.3",
"posthtml-style-to-file": "^0.1.1",
"read-pkg": "^1.1.0",
"temp-write": "^2.1.0",
Expand Down
5 changes: 5 additions & 0 deletions src/prepare-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ function isSequence(plugin) {
return /posthtml-(?!standard-sequence)/.test(plugin);
}

function isConfig(plugin) {
return /posthtml-(?!standard-config)/.test(plugin);
}

function toSnakeCase(plugin) {
return plugin
.slice(9)
Expand All @@ -32,6 +36,7 @@ export default (...options) => {
.filter(exclude)
.filter(isNotMe)
.filter(isSequence)
.filter(isConfig)
.map(toSnakeCase)
.reduce((previousValue, currentValue) => Object.assign(previousValue, {[currentValue]: {}}), {}),
posthtml,
Expand Down

0 comments on commit 2fb3d73

Please sign in to comment.