-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
304 lines (181 loc) · 22.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Young's blog</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta property="og:type" content="website">
<meta property="og:title" content="Young's blog">
<meta property="og:url" content="http://example.com/index.html">
<meta property="og:site_name" content="Young's blog">
<meta property="og:locale">
<meta property="article:author" content="Young">
<meta name="twitter:card" content="summary">
<link rel="alternate" href="/atom.xml" title="Young's blog" type="application/atom+xml">
<link rel="shortcut icon" href="/favicon.png">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/index.min.css">
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/fancybox/jquery.fancybox.min.css">
<meta name="generator" content="Hexo 6.2.0"></head>
<body>
<div id="container">
<div id="wrap">
<header id="header">
<div id="banner"></div>
<div id="header-outer" class="outer">
<div id="header-title" class="inner">
<h1 id="logo-wrap">
<a href="/" id="logo">Young's blog</a>
</h1>
<h2 id="subtitle-wrap">
<a href="/" id="subtitle">powered by Hexo</a>
</h2>
</div>
<div id="header-inner" class="inner">
<nav id="main-nav">
<a id="main-nav-toggle" class="nav-icon"></a>
<a class="main-nav-link" href="/">Home</a>
<a class="main-nav-link" href="/archives">Archives</a>
</nav>
<nav id="sub-nav">
<a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
<a id="nav-search-btn" class="nav-icon" title="Suche"></a>
</nav>
<div id="search-form-wrap">
<form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Suche"><button type="submit" class="search-form-submit"></button><input type="hidden" name="sitesearch" value="http://example.com"></form>
</div>
</div>
</div>
</header>
<div class="outer">
<section id="main">
<article id="post-我的第一篇博文" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<div class="article-meta">
<a href="/2022/07/08/%E6%88%91%E7%9A%84%E7%AC%AC%E4%B8%80%E7%AF%87%E5%8D%9A%E6%96%87/" class="article-date">
<time class="dt-published" datetime="2022-07-07T16:12:07.000Z" itemprop="datePublished">2022-07-08</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="p-name article-title" href="/2022/07/08/%E6%88%91%E7%9A%84%E7%AC%AC%E4%B8%80%E7%AF%87%E5%8D%9A%E6%96%87/">我的第一篇博文</a>
</h1>
</header>
<div class="e-content article-entry" itemprop="articleBody">
<h1 id="tslib"><a href="#tslib" class="headerlink" title="tslib"></a>tslib</h1><p>This is a runtime library for <a target="_blank" rel="noopener" href="http://www.typescriptlang.org/">TypeScript</a> that contains all of the TypeScript helper functions.</p>
<p>This library is primarily used by the <code>--importHelpers</code> flag in TypeScript.<br>When using <code>--importHelpers</code>, a module that uses helper functions like <code>__extends</code> and <code>__assign</code> in the following emitted file:</p>
<figure class="highlight ts"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> __assign = (<span class="variable language_">this</span> && <span class="variable language_">this</span>.<span class="property">__assign</span>) || <span class="title class_">Object</span>.<span class="property">assign</span> || <span class="keyword">function</span>(<span class="params">t</span>) {</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> s, i = <span class="number">1</span>, n = <span class="variable language_">arguments</span>.<span class="property">length</span>; i < n; i++) {</span><br><span class="line"> s = <span class="variable language_">arguments</span>[i];</span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">var</span> p <span class="keyword">in</span> s) <span class="keyword">if</span> (<span class="title class_">Object</span>.<span class="property"><span class="keyword">prototype</span></span>.<span class="property">hasOwnProperty</span>.<span class="title function_">call</span>(s, p))</span><br><span class="line"> t[p] = s[p];</span><br><span class="line"> }</span><br><span class="line"> <span class="keyword">return</span> t;</span><br><span class="line">};</span><br><span class="line"><span class="built_in">exports</span>.<span class="property">x</span> = {};</span><br><span class="line"><span class="built_in">exports</span>.<span class="property">y</span> = <span class="title function_">__assign</span>({}, <span class="built_in">exports</span>.<span class="property">x</span>);</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>will instead be emitted as something like the following:</p>
<figure class="highlight ts"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> tslib_1 = <span class="built_in">require</span>(<span class="string">"tslib"</span>);</span><br><span class="line"><span class="built_in">exports</span>.<span class="property">x</span> = {};</span><br><span class="line"><span class="built_in">exports</span>.<span class="property">y</span> = tslib_1.<span class="title function_">__assign</span>({}, <span class="built_in">exports</span>.<span class="property">x</span>);</span><br></pre></td></tr></table></figure>
<p>Because this can avoid duplicate declarations of things like <code>__extends</code>, <code>__assign</code>, etc., this means delivering users smaller files on average, as well as less runtime overhead.<br>For optimized bundles with TypeScript, you should absolutely consider using <code>tslib</code> and <code>--importHelpers</code>.</p>
<h1 id="Installing"><a href="#Installing" class="headerlink" title="Installing"></a>Installing</h1><p>For the latest stable version, run:</p>
<h2 id="npm"><a href="#npm" class="headerlink" title="npm"></a>npm</h2><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># TypeScript 3.9.2 or later</span></span><br><span class="line">npm install tslib</span><br><span class="line"></span><br><span class="line"><span class="comment"># TypeScript 3.8.4 or earlier</span></span><br><span class="line">npm install tslib@^1</span><br><span class="line"></span><br><span class="line"><span class="comment"># TypeScript 2.3.2 or earlier</span></span><br><span class="line">npm install [email protected]</span><br></pre></td></tr></table></figure>
<h2 id="yarn"><a href="#yarn" class="headerlink" title="yarn"></a>yarn</h2><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># TypeScript 3.9.2 or later</span></span><br><span class="line">yarn add tslib</span><br><span class="line"></span><br><span class="line"><span class="comment"># TypeScript 3.8.4 or earlier</span></span><br><span class="line">yarn add tslib@^1</span><br><span class="line"></span><br><span class="line"><span class="comment"># TypeScript 2.3.2 or earlier</span></span><br><span class="line">yarn add [email protected]</span><br></pre></td></tr></table></figure>
<h2 id="bower"><a href="#bower" class="headerlink" title="bower"></a>bower</h2><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># TypeScript 3.9.2 or later</span></span><br><span class="line">bower install tslib</span><br><span class="line"></span><br><span class="line"><span class="comment"># TypeScript 3.8.4 or earlier</span></span><br><span class="line">bower install tslib@^1</span><br><span class="line"></span><br><span class="line"><span class="comment"># TypeScript 2.3.2 or earlier</span></span><br><span class="line">bower install [email protected]</span><br></pre></td></tr></table></figure>
<h2 id="JSPM"><a href="#JSPM" class="headerlink" title="JSPM"></a>JSPM</h2><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># TypeScript 3.9.2 or later</span></span><br><span class="line">jspm install tslib</span><br><span class="line"></span><br><span class="line"><span class="comment"># TypeScript 3.8.4 or earlier</span></span><br><span class="line">jspm install tslib@^1</span><br><span class="line"></span><br><span class="line"><span class="comment"># TypeScript 2.3.2 or earlier</span></span><br><span class="line">jspm install [email protected]</span><br></pre></td></tr></table></figure>
<h1 id="Usage"><a href="#Usage" class="headerlink" title="Usage"></a>Usage</h1><p>Set the <code>importHelpers</code> compiler option on the command line:</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">tsc --importHelpers file.ts</span><br></pre></td></tr></table></figure>
<p>or in your tsconfig.json:</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="punctuation">{</span></span><br><span class="line"> <span class="attr">"compilerOptions"</span><span class="punctuation">:</span> <span class="punctuation">{</span></span><br><span class="line"> <span class="attr">"importHelpers"</span><span class="punctuation">:</span> <span class="keyword">true</span></span><br><span class="line"> <span class="punctuation">}</span></span><br><span class="line"><span class="punctuation">}</span></span><br></pre></td></tr></table></figure>
<h4 id="For-bower-and-JSPM-users"><a href="#For-bower-and-JSPM-users" class="headerlink" title="For bower and JSPM users"></a>For bower and JSPM users</h4><p>You will need to add a <code>paths</code> mapping for <code>tslib</code>, e.g. For Bower users:</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="punctuation">{</span></span><br><span class="line"> <span class="attr">"compilerOptions"</span><span class="punctuation">:</span> <span class="punctuation">{</span></span><br><span class="line"> <span class="attr">"module"</span><span class="punctuation">:</span> <span class="string">"amd"</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"importHelpers"</span><span class="punctuation">:</span> <span class="keyword">true</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"baseUrl"</span><span class="punctuation">:</span> <span class="string">"./"</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"paths"</span><span class="punctuation">:</span> <span class="punctuation">{</span></span><br><span class="line"> <span class="attr">"tslib"</span> <span class="punctuation">:</span> <span class="punctuation">[</span><span class="string">"bower_components/tslib/tslib.d.ts"</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">}</span></span><br><span class="line"> <span class="punctuation">}</span></span><br><span class="line"><span class="punctuation">}</span></span><br></pre></td></tr></table></figure>
<p>For JSPM users:</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="punctuation">{</span></span><br><span class="line"> <span class="attr">"compilerOptions"</span><span class="punctuation">:</span> <span class="punctuation">{</span></span><br><span class="line"> <span class="attr">"module"</span><span class="punctuation">:</span> <span class="string">"system"</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"importHelpers"</span><span class="punctuation">:</span> <span class="keyword">true</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"baseUrl"</span><span class="punctuation">:</span> <span class="string">"./"</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"paths"</span><span class="punctuation">:</span> <span class="punctuation">{</span></span><br><span class="line"> <span class="attr">"tslib"</span> <span class="punctuation">:</span> <span class="punctuation">[</span><span class="string">"jspm_packages/npm/[email protected]/tslib.d.ts"</span><span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">}</span></span><br><span class="line"> <span class="punctuation">}</span></span><br><span class="line"><span class="punctuation">}</span></span><br></pre></td></tr></table></figure>
<h2 id="Deployment"><a href="#Deployment" class="headerlink" title="Deployment"></a>Deployment</h2><ul>
<li>Choose your new version number</li>
<li>Set it in <code>package.json</code> and <code>bower.json</code></li>
<li>Create a tag: <code>git tag [version]</code></li>
<li>Push the tag: <code>git push --tags</code></li>
<li>Create a <a target="_blank" rel="noopener" href="https://github.com/microsoft/tslib/releases">release in GitHub</a></li>
<li>Run the <a target="_blank" rel="noopener" href="https://github.com/microsoft/tslib/actions?query=workflow:%22Publish+to+NPM%22">publish to npm</a> workflow</li>
</ul>
<p>Done.</p>
<h1 id="Contribute"><a href="#Contribute" class="headerlink" title="Contribute"></a>Contribute</h1><p>There are many ways to <a target="_blank" rel="noopener" href="https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md">contribute</a> to TypeScript.</p>
<ul>
<li><a target="_blank" rel="noopener" href="https://github.com/Microsoft/TypeScript/issues">Submit bugs</a> and help us verify fixes as they are checked in.</li>
<li>Review the <a target="_blank" rel="noopener" href="https://github.com/Microsoft/TypeScript/pulls">source code changes</a>.</li>
<li>Engage with other TypeScript users and developers on <a target="_blank" rel="noopener" href="http://stackoverflow.com/questions/tagged/typescript">StackOverflow</a>.</li>
<li>Join the <a target="_blank" rel="noopener" href="http://twitter.com/#!/search/realtime/%23typescript">#typescript</a> discussion on Twitter.</li>
<li><a target="_blank" rel="noopener" href="https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md">Contribute bug fixes</a>.</li>
</ul>
<h1 id="Documentation"><a href="#Documentation" class="headerlink" title="Documentation"></a>Documentation</h1><ul>
<li><a target="_blank" rel="noopener" href="http://www.typescriptlang.org/Tutorial">Quick tutorial</a></li>
<li><a target="_blank" rel="noopener" href="http://www.typescriptlang.org/Handbook">Programming handbook</a></li>
<li><a target="_blank" rel="noopener" href="http://www.typescriptlang.org/">Homepage</a></li>
</ul>
</div>
<footer class="article-footer">
<a data-url="http://example.com/2022/07/08/%E6%88%91%E7%9A%84%E7%AC%AC%E4%B8%80%E7%AF%87%E5%8D%9A%E6%96%87/" data-id="cl5cnayxi0001x0j3gawedck8" data-title="我的第一篇博文" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
<article id="post-hello-world" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<div class="article-meta">
<a href="/2022/07/07/hello-world/" class="article-date">
<time class="dt-published" datetime="2022-07-07T15:54:50.240Z" itemprop="datePublished">2022-07-07</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="p-name article-title" href="/2022/07/07/hello-world/">Hello World</a>
</h1>
</header>
<div class="e-content article-entry" itemprop="articleBody">
<p>Welcome to <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a target="_blank" rel="noopener" href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a target="_blank" rel="noopener" href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
</div>
<footer class="article-footer">
<a data-url="http://example.com/2022/07/07/hello-world/" data-id="cl5cnayxe0000x0j346cw20ey" data-title="Hello World" class="article-share-link">Teilen</a>
</footer>
</div>
</article>
</section>
<aside id="sidebar">
<div class="widget-wrap">
<h3 class="widget-title">Archiv</h3>
<div class="widget">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/07/">July 2022</a></li></ul>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">letzter Beitrag</h3>
<div class="widget">
<ul>
<li>
<a href="/2022/07/08/%E6%88%91%E7%9A%84%E7%AC%AC%E4%B8%80%E7%AF%87%E5%8D%9A%E6%96%87/">我的第一篇博文</a>
</li>
<li>
<a href="/2022/07/07/hello-world/">Hello World</a>
</li>
</ul>
</div>
</div>
</aside>
</div>
<footer id="footer">
<div class="outer">
<div id="footer-info" class="inner">
© 2022 Young<br>
Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
</div>
</div>
</footer>
</div>
<nav id="mobile-nav">
<a href="/" class="mobile-nav-link">Home</a>
<a href="/archives" class="mobile-nav-link">Archives</a>
</nav>
<script src="/js/jquery-3.4.1.min.js"></script>
<script src="/fancybox/jquery.fancybox.min.js"></script>
<script src="/js/script.js"></script>
</div>
</body>
</html>