Skip to content

Commit

Permalink
v3.18.0 feat: add disable log option log/logger. (#183) 56d078d
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 24, 2022
1 parent 818957b commit c825702
Show file tree
Hide file tree
Showing 30 changed files with 322 additions and 284 deletions.
8 changes: 4 additions & 4 deletions badges.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions coverage-summary.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{"total": {"lines":{"total":280,"covered":248,"skipped":0,"pct":88.57},"statements":{"total":298,"covered":259,"skipped":0,"pct":86.91},"functions":{"total":67,"covered":60,"skipped":0,"pct":89.55},"branches":{"total":181,"covered":121,"skipped":0,"pct":66.85},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":"Unknown"}}
{"total": {"lines":{"total":285,"covered":252,"skipped":0,"pct":88.42},"statements":{"total":306,"covered":264,"skipped":0,"pct":86.27},"functions":{"total":68,"covered":61,"skipped":0,"pct":89.7},"branches":{"total":189,"covered":124,"skipped":0,"pct":65.6},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":"Unknown"}}
,"/home/runner/work/svgtofont/svgtofont/src/cli.ts": {"lines":{"total":11,"covered":0,"skipped":0,"pct":0},"functions":{"total":2,"covered":0,"skipped":0,"pct":0},"statements":{"total":11,"covered":0,"skipped":0,"pct":0},"branches":{"total":6,"covered":0,"skipped":0,"pct":0}}
,"/home/runner/work/svgtofont/svgtofont/src/generate.ts": {"lines":{"total":36,"covered":35,"skipped":0,"pct":97.22},"functions":{"total":11,"covered":11,"skipped":0,"pct":100},"statements":{"total":41,"covered":40,"skipped":0,"pct":97.56},"branches":{"total":27,"covered":17,"skipped":0,"pct":62.96}}
,"/home/runner/work/svgtofont/svgtofont/src/index.ts": {"lines":{"total":98,"covered":94,"skipped":0,"pct":95.91},"functions":{"total":4,"covered":4,"skipped":0,"pct":100},"statements":{"total":103,"covered":98,"skipped":0,"pct":95.14},"branches":{"total":87,"covered":71,"skipped":0,"pct":81.6}}
,"/home/runner/work/svgtofont/svgtofont/src/log.ts": {"lines":{"total":10,"covered":8,"skipped":0,"pct":80},"functions":{"total":7,"covered":4,"skipped":0,"pct":57.14},"statements":{"total":12,"covered":8,"skipped":0,"pct":66.66},"branches":{"total":6,"covered":3,"skipped":0,"pct":50}}
,"/home/runner/work/svgtofont/svgtofont/src/index.ts": {"lines":{"total":100,"covered":96,"skipped":0,"pct":96},"functions":{"total":4,"covered":4,"skipped":0,"pct":100},"statements":{"total":106,"covered":100,"skipped":0,"pct":94.33},"branches":{"total":91,"covered":73,"skipped":0,"pct":80.21}}
,"/home/runner/work/svgtofont/svgtofont/src/log.ts": {"lines":{"total":13,"covered":10,"skipped":0,"pct":76.92},"functions":{"total":8,"covered":5,"skipped":0,"pct":62.5},"statements":{"total":17,"covered":11,"skipped":0,"pct":64.7},"branches":{"total":10,"covered":4,"skipped":0,"pct":40}}
,"/home/runner/work/svgtofont/svgtofont/src/utils.ts": {"lines":{"total":125,"covered":111,"skipped":0,"pct":88.8},"functions":{"total":43,"covered":41,"skipped":0,"pct":95.34},"statements":{"total":131,"covered":113,"skipped":0,"pct":86.25},"branches":{"total":55,"covered":30,"skipped":0,"pct":54.54}}
}
8 changes: 4 additions & 4 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@
/* IE9*/
src: url("svgtofont.eot#iefix") format("embedded-opentype"),
/* IE6-IE8 */
url("svgtofont.woff2?1666605679954") format("woff2"),
url("svgtofont.woff?1666605679954") format("woff"),
url("svgtofont.woff2?1666606152330") format("woff2"),
url("svgtofont.woff?1666606152330") format("woff"),
/* chrome, firefox */
url("svgtofont.ttf?1666605679954") format("truetype"),
url("svgtofont.ttf?1666606152330") format("truetype"),
/* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url("svgtofont.svg#svgtofont?1666605679954") format("svg");
url("svgtofont.svg#svgtofont?1666606152330") format("svg");
/* iOS 4.1- */
}
.iconfont {
Expand Down
12 changes: 6 additions & 6 deletions example/svgtofont.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@font-face {
font-family: "svgtofont";
src: url('svgtofont.eot?t=1666605679936'); /* IE9*/
src: url('svgtofont.eot?t=1666605679936#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("svgtofont.woff2?t=1666605679936") format("woff2"),
url("svgtofont.woff?t=1666605679936") format("woff"),
url('svgtofont.ttf?t=1666605679936') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('svgtofont.svg?t=1666605679936#svgtofont') format('svg'); /* iOS 4.1- */
src: url('svgtofont.eot?t=1666606152307'); /* IE9*/
src: url('svgtofont.eot?t=1666606152307#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("svgtofont.woff2?t=1666606152307") format("woff2"),
url("svgtofont.woff?t=1666606152307") format("woff"),
url('svgtofont.ttf?t=1666606152307') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('svgtofont.svg?t=1666606152307#svgtofont') format('svg'); /* iOS 4.1- */
}

[class^="svgtofont-"], [class*=" svgtofont-"] {
Expand Down
Binary file modified example/svgtofont.eot
Binary file not shown.
12 changes: 6 additions & 6 deletions example/svgtofont.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@font-face {font-family: "svgtofont";
src: url('svgtofont.eot?t=1666605679936'); /* IE9*/
src: url('svgtofont.eot?t=1666605679936#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("svgtofont.woff2?t=1666605679936") format("woff2"),
url("svgtofont.woff?t=1666605679936") format("woff"),
url('svgtofont.ttf?t=1666605679936') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('svgtofont.svg?t=1666605679936#svgtofont') format('svg'); /* iOS 4.1- */
src: url('svgtofont.eot?t=1666606152307'); /* IE9*/
src: url('svgtofont.eot?t=1666606152307#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("svgtofont.woff2?t=1666606152307") format("woff2"),
url("svgtofont.woff?t=1666606152307") format("woff"),
url('svgtofont.ttf?t=1666606152307') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('svgtofont.svg?t=1666606152307#svgtofont') format('svg'); /* iOS 4.1- */
}

[class^="svgtofont-"], [class*=" svgtofont-"] {
Expand Down
12 changes: 6 additions & 6 deletions example/svgtofont.module.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@font-face {font-family: "svgtofont";
src: url('svgtofont.eot?t=1666605679936'); /* IE9*/
src: url('svgtofont.eot?t=1666605679936#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("svgtofont.woff2?t=1666605679936") format("woff2"),
url("svgtofont.woff?t=1666605679936") format("woff"),
url('svgtofont.ttf?t=1666605679936') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('svgtofont.svg?t=1666605679936#svgtofont') format('svg'); /* iOS 4.1- */
src: url('svgtofont.eot?t=1666606152307'); /* IE9*/
src: url('svgtofont.eot?t=1666606152307#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("svgtofont.woff2?t=1666606152307") format("woff2"),
url("svgtofont.woff?t=1666606152307") format("woff"),
url('svgtofont.ttf?t=1666606152307') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('svgtofont.svg?t=1666606152307#svgtofont') format('svg'); /* iOS 4.1- */
}

[class^="svgtofont-"], [class*=" svgtofont-"] {
Expand Down
12 changes: 6 additions & 6 deletions example/svgtofont.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@font-face {font-family: "svgtofont";
src: url('svgtofont.eot?t=1666605679936'); /* IE9*/
src: url('svgtofont.eot?t=1666605679936#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("svgtofont.woff2?t=1666605679936") format("woff2"),
url("svgtofont.woff?t=1666605679936") format("woff"),
url('svgtofont.ttf?t=1666605679936') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('svgtofont.svg?t=1666605679936#svgtofont') format('svg'); /* iOS 4.1- */
src: url('svgtofont.eot?t=1666606152307'); /* IE9*/
src: url('svgtofont.eot?t=1666606152307#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("svgtofont.woff2?t=1666606152307") format("woff2"),
url("svgtofont.woff?t=1666606152307") format("woff"),
url('svgtofont.ttf?t=1666606152307') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('svgtofont.svg?t=1666606152307#svgtofont') format('svg'); /* iOS 4.1- */
}

[class^="svgtofont-"], [class*=" svgtofont-"] {
Expand Down
12 changes: 6 additions & 6 deletions example/svgtofont.styl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@font-face {font-family: "svgtofont";
src: url('svgtofont.eot?t=1666605679936'); /* IE9*/
src: url('svgtofont.eot?t=1666605679936#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("svgtofont.woff2?t=1666605679936") format("woff2"),
url("svgtofont.woff?t=1666605679936") format("woff"),
url('svgtofont.ttf?t=1666605679936') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('svgtofont.svg?t=1666605679936#svgtofont') format('svg'); /* iOS 4.1- */
src: url('svgtofont.eot?t=1666606152307'); /* IE9*/
src: url('svgtofont.eot?t=1666606152307#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("svgtofont.woff2?t=1666606152307") format("woff2"),
url("svgtofont.woff?t=1666606152307") format("woff"),
url('svgtofont.ttf?t=1666606152307') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('svgtofont.svg?t=1666606152307#svgtofont') format('svg'); /* iOS 4.1- */
}

[class^="svgtofont-"], [class*=" svgtofont-"] {
Expand Down
Binary file modified example/svgtofont.ttf
Binary file not shown.
Binary file modified example/svgtofont.woff
Binary file not shown.
Binary file modified example/svgtofont.woff2
Binary file not shown.
8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,16 @@ <h2 id="options"><a class="anchor" aria-hidden="true" tabindex="-1" href="#optio
<blockquote>
<p>svgtofont(options)</p>
</blockquote>
<pre><code class="code-highlight"><span class="code-line line-number" line="1">"log": false,
</span></code><div onclick="copied(this)" data-code="&#x22;log&#x22;: false,
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="log"><a class="anchor" aria-hidden="true" tabindex="-1" href="#log"><span class="octicon octicon-link"></span></a>log</h3>
<blockquote>
<p>Type: <code>Boolean</code></p>
</blockquote>
<p>A value of <code>false</code> disables logging</p>
<h3 id="logger"><a class="anchor" aria-hidden="true" tabindex="-1" href="#logger"><span class="octicon octicon-link"></span></a>logger</h3>
<blockquote>
<p>Type: <code>(msg) => void</code></p>
</blockquote>
<p>log callback function</p>
<h3 id="dist"><a class="anchor" aria-hidden="true" tabindex="-1" href="#dist"><span class="octicon octicon-link"></span></a>dist</h3>
<blockquote>
<p>Type: <code>String</code><br>Default value: <del><code>dist</code></del> => <code>fonts</code></p>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/cli.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ <h1><a href="index.html">All files</a> cli.ts</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-10-24T10:01:19.068Z
at 2022-10-24T10:09:11.291Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/generate.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ <h1><a href="index.html">All files</a> generate.ts</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-10-24T10:01:19.068Z
at 2022-10-24T10:09:11.291Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down
54 changes: 27 additions & 27 deletions lcov-report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ <h1>All files</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">86.91% </span>
<span class="strong">86.27% </span>
<span class="quiet">Statements</span>
<span class='fraction'>259/298</span>
<span class='fraction'>264/306</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">66.85% </span>
<span class="strong">65.6% </span>
<span class="quiet">Branches</span>
<span class='fraction'>121/181</span>
<span class='fraction'>124/189</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">89.55% </span>
<span class="strong">89.7% </span>
<span class="quiet">Functions</span>
<span class='fraction'>60/67</span>
<span class='fraction'>61/68</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">88.57% </span>
<span class="strong">88.42% </span>
<span class="quiet">Lines</span>
<span class='fraction'>248/280</span>
<span class='fraction'>252/285</span>
</div>


Expand Down Expand Up @@ -110,32 +110,32 @@ <h1>All files</h1>

<tr>
<td class="file high" data-value="index.ts"><a href="index.ts.html">index.ts</a></td>
<td data-value="95.14" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 95%"></div><div class="cover-empty" style="width: 5%"></div></div>
<td data-value="94.33" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 94%"></div><div class="cover-empty" style="width: 6%"></div></div>
</td>
<td data-value="95.14" class="pct high">95.14%</td>
<td data-value="103" class="abs high">98/103</td>
<td data-value="81.6" class="pct high">81.6%</td>
<td data-value="87" class="abs high">71/87</td>
<td data-value="94.33" class="pct high">94.33%</td>
<td data-value="106" class="abs high">100/106</td>
<td data-value="80.21" class="pct high">80.21%</td>
<td data-value="91" class="abs high">73/91</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="95.91" class="pct high">95.91%</td>
<td data-value="98" class="abs high">94/98</td>
<td data-value="96" class="pct high">96%</td>
<td data-value="100" class="abs high">96/100</td>
</tr>

<tr>
<td class="file medium" data-value="log.ts"><a href="log.ts.html">log.ts</a></td>
<td data-value="66.66" class="pic medium">
<div class="chart"><div class="cover-fill" style="width: 66%"></div><div class="cover-empty" style="width: 34%"></div></div>
<td data-value="64.7" class="pic medium">
<div class="chart"><div class="cover-fill" style="width: 64%"></div><div class="cover-empty" style="width: 36%"></div></div>
</td>
<td data-value="66.66" class="pct medium">66.66%</td>
<td data-value="12" class="abs medium">8/12</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="6" class="abs medium">3/6</td>
<td data-value="57.14" class="pct medium">57.14%</td>
<td data-value="7" class="abs medium">4/7</td>
<td data-value="80" class="pct high">80%</td>
<td data-value="10" class="abs high">8/10</td>
<td data-value="64.7" class="pct medium">64.7%</td>
<td data-value="17" class="abs medium">11/17</td>
<td data-value="40" class="pct low">40%</td>
<td data-value="10" class="abs low">4/10</td>
<td data-value="62.5" class="pct medium">62.5%</td>
<td data-value="8" class="abs medium">5/8</td>
<td data-value="76.92" class="pct medium">76.92%</td>
<td data-value="13" class="abs medium">10/13</td>
</tr>

<tr>
Expand All @@ -161,7 +161,7 @@ <h1>All files</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-10-24T10:01:19.068Z
at 2022-10-24T10:09:11.291Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down

0 comments on commit c825702

Please sign in to comment.