Skip to content

Commit 8f04b92

Browse files
Added more utilities and prepare for release beta.12
1 parent 2035928 commit 8f04b92

File tree

9 files changed

+69
-4
lines changed

9 files changed

+69
-4
lines changed

changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.0-beta.12 (2022-10-31)
2+
3+
* Added more utilities
4+
15
## 1.0.0-beta.11 (2022-10-30)
26

37
* Add new options to pass utilities methods to script like lodash `mergeWith` and `template`

docs-src/md/changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.0-beta.12 (2022-10-31)
2+
3+
* Added more utilities
4+
*
15
## 1.0.0-beta.11 (2022-10-30)
26

37
* Add new options to pass utilities methods to script like lodash `mergeWith` and `template`

docs-src/pages/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1 class="display-1 fw-bold mb-4">Build the web with PostHTML</h1>
1414
</div>
1515

1616
<p class="text-muted">
17-
Currently <strong>v1.0.0-beta.11</strong>
17+
Currently <strong>v1.0.0-beta.12</strong>
1818
<span class="px-1">·</span>
1919
<a href="#" class="link-secondary" data-bs-toggle="modal" data-bs-target="#modalWithComponents">Changelog</a>
2020
</p>

docs/demo.html

+8
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ <h5 class="modal-title" id="modalWithComponentsLabel">Changelog</h5>
7777
</div>
7878
<!-- /.modal-header -->
7979
<div class="modal-body">
80+
<h2 id="1.0.0-beta.12-(2022-10-31)" tabindex="-1">
81+
<a class="header-anchor" href="#1.0.0-beta.12-(2022-10-31)">#</a>
82+
1.0.0-beta.12 (2022-10-31)
83+
</h2>
84+
<ul>
85+
<li>Added more utilities</li>
86+
<li></li>
87+
</ul>
8088
<h2 id="1.0.0-beta.11-(2022-10-30)" tabindex="-1">
8189
<a class="header-anchor" href="#1.0.0-beta.11-(2022-10-30)">#</a>
8290
1.0.0-beta.11 (2022-10-30)

docs/docs.html

+8
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,14 @@ <h5 class="modal-title" id="modalWithComponentsLabel">Changelog</h5>
14881488
</div>
14891489
<!-- /.modal-header -->
14901490
<div class="modal-body">
1491+
<h2 id="1.0.0-beta.12-(2022-10-31)" tabindex="-1">
1492+
<a class="header-anchor" href="#1.0.0-beta.12-(2022-10-31)">#</a>
1493+
1.0.0-beta.12 (2022-10-31)
1494+
</h2>
1495+
<ul>
1496+
<li>Added more utilities</li>
1497+
<li></li>
1498+
</ul>
14911499
<h2 id="1.0.0-beta.11-(2022-10-30)" tabindex="-1">
14921500
<a class="header-anchor" href="#1.0.0-beta.11-(2022-10-30)">#</a>
14931501
1.0.0-beta.11 (2022-10-30)

docs/index.html

+9-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ <h1 class="display-1 fw-bold mb-4">Build the web with PostHTML</h1>
5959
</div>
6060
<p class="text-muted">
6161
Currently
62-
<strong>v1.0.0-beta.11</strong>
62+
<strong>v1.0.0-beta.12</strong>
6363
<span class="px-1">·</span>
6464
<a href="#" class="link-secondary" data-bs-toggle="modal" data-bs-target="#modalWithComponents">Changelog</a>
6565
</p>
@@ -93,6 +93,14 @@ <h5 class="modal-title" id="modalWithComponentsLabel">Changelog</h5>
9393
</div>
9494
<!-- /.modal-header -->
9595
<div class="modal-body">
96+
<h2 id="1.0.0-beta.12-(2022-10-31)" tabindex="-1">
97+
<a class="header-anchor" href="#1.0.0-beta.12-(2022-10-31)">#</a>
98+
1.0.0-beta.12 (2022-10-31)
99+
</h2>
100+
<ul>
101+
<li>Added more utilities</li>
102+
<li></li>
103+
</ul>
96104
<h2 id="1.0.0-beta.11-(2022-10-30)" tabindex="-1">
97105
<a class="header-anchor" href="#1.0.0-beta.11-(2022-10-30)">#</a>
98106
1.0.0-beta.11 (2022-10-30)

docs/test.html

+8
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,14 @@ <h5 class="modal-title" id="modalWithComponentsLabel">Changelog</h5>
221221
</div>
222222
<!-- /.modal-header -->
223223
<div class="modal-body">
224+
<h2 id="1.0.0-beta.12-(2022-10-31)" tabindex="-1">
225+
<a class="header-anchor" href="#1.0.0-beta.12-(2022-10-31)">#</a>
226+
1.0.0-beta.12 (2022-10-31)
227+
</h2>
228+
<ul>
229+
<li>Added more utilities</li>
230+
<li></li>
231+
</ul>
224232
<h2 id="1.0.0-beta.11-(2022-10-30)" tabindex="-1">
225233
<a class="header-anchor" href="#1.0.0-beta.11-(2022-10-30)">#</a>
226234
1.0.0-beta.11 (2022-10-30)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "posthtml-component",
3-
"version": "1.0.0-beta.11",
3+
"version": "1.0.0-beta.12",
44
"description": "PostHTML Components Blade-like with slots, attributes as props and custom tag",
55
"license": "MIT",
66
"repository": "thewebartisan7/posthtml-components",

src/index.js

+26-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,19 @@ const processProps = require('./process-props');
1010
const processAttributes = require('./process-attributes');
1111
const {processPushes, processStacks} = require('./process-stacks');
1212
const {setFilledSlots, processSlotContent, processFillContent} = require('./process-slots');
13+
const defaults = require('lodash/defaults');
14+
const assignWith = require('lodash/assignWith');
1315
const mergeWith = require('lodash/mergeWith');
1416
const template = require('lodash/template');
17+
const get = require('lodash/get');
18+
const has = require('lodash/has');
19+
const isObjectLike = require('lodash/isObjectLike');
20+
const isArray = require('lodash/isArray');
21+
const isEmpty = require('lodash/isEmpty');
22+
const isBoolean = require('lodash/isBoolean');
23+
const isUndefined = require('lodash/isUndefined'); // value === undefined
24+
const isNull = require('lodash/isNull'); // value === null
25+
const isNil = require('lodash/isNil'); // value == null
1526

1627
// const {inspect} = require('util');
1728
// const debug = true;
@@ -45,7 +56,21 @@ module.exports = (options = {}) => tree => {
4556
options.plugins = options.plugins || [];
4657
options.attrsParserRules = options.attrsParserRules || {};
4758
options.strict = typeof options.strict === 'undefined' ? true : options.strict;
48-
options.utilities = options.utilities || {merge: mergeWith, template};
59+
options.utilities = options.utilities || {
60+
defaults,
61+
assign: assignWith,
62+
merge: mergeWith,
63+
template,
64+
get,
65+
has,
66+
isObject: isObjectLike,
67+
isArray,
68+
isEmpty,
69+
isBoolean,
70+
isUndefined,
71+
isNull,
72+
isNil
73+
};
4974

5075
// Merge customizer callback passed to lodash mergeWith
5176
// for merge attribute `props` and all attributes starting with `merge:`

0 commit comments

Comments
 (0)