PageSourceSearch

https://njleonzhang.github.io/

html njleonzhang.github.io collected 2026-10-03 09:41:10 UTC 16,675 bytes, 387 lines download raw bytes

1<!DOCTYPE html>
2<html>
3<head>
4    <meta charset="UTF-8">
5    <meta name="viewport" content="width=device-width, initial-scale=1.0">
6    <title>Blog of Leon Zhang</title>
7    <meta name="author"  content="Leon Zhang">
8    <meta name="description" content="Leon Zhang, font end engineer. record and share something here">
9    <meta name="keywords"  content="Leon Zhang, 章鹏程">
10    <!-- Open Graph -->
11    <meta property="og:title" content="Blog of Leon Zhang">
12    <meta property="og:type" content="website">
13    <meta property="og:url" content="https://www.njleonzhang.com/">
14    <meta property="og:description" content="Leon Zhang, font end engineer. record and share something here">
15    <meta property="og:site_name" content="Blog of Leon Zhang">
16    <link rel="stylesheet" href="//cdn.staticfile.org/normalize/6.0.0/normalize.min.css">
17    <link rel="stylesheet" href="//at.alicdn.com/t/font_roc50gemkxpw4s4i.css">
18    <link rel="stylesheet" href="/assets/css/github-markdown.css">
19    <link rel="stylesheet" href="/assets/css/prism.css">
20    <link rel="stylesheet" href="/assets/css/share.min.css">
21    <link rel="stylesheet" href="/assets/css/app.min.css">
22    <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
23    
23<script src="/assets/js/jquery-3.2.1.min.js"></script>
23
24    
25    <!-- GrowingIO Analytics code version 2.1 -->
26    <!-- Copyright 2015-2018 GrowingIO, Inc. More info available at http://www.growingio.com -->
27    
28    
28<script type='text/javascript'>
29    !function(e,t,n,g,i){e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},n=t.createElement("script"),tag=t.getElementsByTagName("script")[0],n.async=1,n.src=('https:'==document.location.protocol?'https://':'http://')+g,tag.parentNode.insertBefore(n,tag)}(window,document,"script","assets.giocdn.com/2.1/gio.js","gio");
30      gio('init','aefd9176b0bbe64a', {});
31    
32    //custom page code begin here
33    
34    //custom page code end here
35    
36    gio('send');
37    
38    </script>
38
39    
40    <!-- End GrowingIO Analytics code version: 2.1 -->
41
42    <!-- Global site tag (gtag.js) - Google Analytics -->
vendor: 68 bytes, lines 42-43
42
43    <script async src="https://www.googletagmanager.com/gtag/js?id=
43UA-110377374-2
vendor: 16 bytes, lines 43-44
43"></script>
44    
44<script>
45        
vendor: 152 bytes, lines 45-49
45window.dataLayer = window.dataLayer || [];
46        function gtag(){dataLayer.push(arguments);}
47        gtag('js', new Date());
48
49        gtag('config', '
49UA-110377374-2
vendor: 8 bytes, lines 49-50
49');
50    
50</script>
50
51    <meta name="baidu-site-verification" content="SOkQ90FQet" />
52    
52<script>
53        (function(){
54            var bp = document.createElement('script');
55            var curProtocol = window.location.protocol.split(':')[0];
56            if (curProtocol === 'https') {
57                bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
58            }
59            else {
60                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
61            }
62            var s = document.getElementsByTagName("script")[0];
63            s.parentNode.insertBefore(bp, s);
64        })();
65    </script>
65
66</head>
67
68<body>
69    <!--[if lt IE 10]>
70<div class="alert-danger" role="alert">你的浏览器实在太太太旧了,放学别走,升级完浏览器再说!<a target="_blank" class="alert-link" href="http://browsehappy.com">立即升级</a></div>
71<![endif]-->
72    <input id="nm-switch" type="hidden" value="false">
73    <div class="visible">
74      <header class="g-header">
75    <div class="g-logo">
76      <a href="/"></a>
77    </div>
78    <i id="menu-toggle" class="iconfont icon-menu"></i>
79    <nav class="g-nav">
80        <ul>
81            
82            <li><a href="/">home</a></li>
83            
84            <li><a href="/tags.html">tags</a></li>
85            
86        </ul>
87    </nav>
88</header>
89
90
91<div class="g-banner home-banner banner-theme-default" data-theme="default">
92    <h2>从零开始</h2>
93    <h3>从小白到入门</h3>
94    
95</div>
96
97<main class="g-container home-content">
98    <div class="article-list">
99        
100            <article class="article-item">
101                
102                <div class="post-cover">
103                    <a class="post-link" href="/2021/03/16/deep-into-react-2.html" title="Deep into React 2 - setState 更新"></a>
104                    <img src="https://raw.githubusercontent.com/njleonzhang/image-bed/master/assets/71603321-aa3b-954f-bae2-64965bd91fc9.png" href="/2021/03/16/deep-into-react-2.html" alt="">
105                </div>
106                
107                <section class="post-preview">
108                    <a class="post-link" href="/2021/03/16/deep-into-react-2.html" title="Deep into React 2 - setState 更新"></a>
109                    <h2 class="post-title">Deep into React 2 - setState 更新</h2>
110                    
111                    
112                    <p class="post-excerpt">上次我们分析了下面这个例子首次 mount 的过程</p>
113                    
114                </section>
115                <footer class="post-meta">
116                    <div class="post-tags">
117                        
118                            
119                            <a href=tags.html#frontend class="post-tag">frontend</a>
120                            
121                            <a href=tags.html#react class="post-tag">react</a>
122                            
123                        
124                    </div>
125                    <time class="post-date" datetime="21-03-16">16 Mar 2021</time>
126                </footer>
127            </article>
128        
129            <article class="article-item">
130                
131                <div class="post-cover">
132                    <a class="post-link" href="/2020/08/24/compose.html" title="函数式编程 compose 函数理解"></a>
133                    <img src="https://raw.githubusercontent.com/njleonzhang/image-bed/master/assets/7dc9f602-201e-480d-f829-79b8e62b6d9c.png" href="/2020/08/24/compose.html" alt="">
134                </div>
135                
136                <section class="post-preview">
137                    <a class="post-link" href="/2020/08/24/compose.html" title="函数式编程 compose 函数理解"></a>
138                    <h2 class="post-title">函数式编程 compose 函数理解</h2>
139                    
140                    
141                    <p class="post-excerpt">compose 在前端被广泛使用,主要用于实现各种插件系统,如 ko
141a 和 redux 的 middleware。其实现很简短,但是却很难理解。本文尝试尽量简单的阐述其原理。 从简单的例子开始:</p>
142                    
143                </section>
144                <footer class="post-meta">
145                    <div class="post-tags">
146                        
147                            
148                            <a href=tags.html#webpack class="post-tag">webpack</a>
149                            
150                        
151                    </div>
152                    <time class="post-date" datetime="20-08-24">24 Aug 2020</time>
153                </footer>
154            </article>
155        
156            <article class="article-item">
157                
158                <div class="post-cover">
159                    <a class="post-link" href="/2019/02/12/webpack-bundle-3.html" title="webpack 输出文件分析 3 - 异步加载"></a>
160                    <img src="https://raw.githubusercontent.com/njleonzhang/image-bed/master/assets/4a30ce00-c8ef-f60a-9de8-c548cde581a0.png" href="/2019/02/12/webpack-bundle-3.html" alt="">
161                </div>
162                
163                <section class="post-preview">
164                    <a class="post-link" href="/2019/02/12/webpack-bundle-3.html" title="webpack 输出文件分析 3 - 异步加载"></a>
165                    <h2 class="post-title">webpack 输出文件分析 3 - 异步加载</h2>
166                    
167                    
168                    <p class="post-excerpt">书接上篇, 本篇我们来看看异步加载(code split).</p>
169                    
170                </section>
171                <footer class="post-meta">
172                    <div class="post-tags">
173                        
174                            
175                            <a href=tags.html#webpack class="post-tag">webpack</a>
176                            
177                        
178                    </div>
179                    <time class="post-date" datetime="19-02-12">12 Feb 2019</time>
180                </footer>
181            </article>
182        
183            <article class="article-item">
184                
185                <div class="post-cover">
186                    <a class="post-link" href="/2019/02/11/webpack-bundle-2.html" title="webpack 输出文件分析 2 - 模块"></a>
187                    <img src="https://raw.githubusercontent.com/njleonzhang/image-bed/master/assets/4a30ce00-c8ef-f60a-9de8-c548cde581a0.png" href="/2019/02/11/webpack-bundle-2.html" alt="">
188                </div>
189                
190                <section class="post-preview">
191                    <a class="post-link" href="/2019/02/11/webpack-bundle-2.html" title="webpack 输出文件分析 2 - 模块"></a>
192                    <h2 class="post-title">webpack 输出文件分析 2 - 模块</h2>
193                    
194                    
195                    <p class="post-excerpt">上篇中,我们分析了 webpack 是如何处理自编译同步加载的,本篇中我们来分析 webpack 是如何处理模块打包和加载的。</p>
196                    
197                </section>
198                <footer class="post-meta">
199                    <div class="post-tags">
200                        
201                            
202                            <a href=tags.html#webpack class="post-tag">webpack</a>
203                            
204                        
205                    </div>
206                    <time class="post-date" datetime="19-02-11">11 Feb 2019</time>
207                </footer>
208            </article>
209        
210            <article class="article-item">
211                
212                <div class="post-cover">
213                    <a class="post-link" href="/2018/12/30/webpack-bundle-1.html" title="webpack 输出文件分析 1 - 自编译同步引入"></a>
214                    <img src="https://raw.githubusercontent.com/njleonzhang/image-bed/master/assets/4a30ce00-c8ef-f60a-9de8-c548cde581a0.png" href="/2018/12/30/webpack-bundle-1.html" alt="">
215                </div>
216                
217                <section class="post-preview">
218                    <a class="post-link" href="/2018/12/30/webpack-bundle-1.html" title="webpack 输出文件分析 1 - 自编译同步引入"></a>
219                    <h2 class="post-title">webpack 输出文件分析 1 - 自编译同步引入</h2>
220                    
221                    
222                    <p class="post-excerpt">webpack 是一个神奇的工具, 他大大的提高了前端开发的便利度。使用 webpack 后, 我们可以模块化的组织前端代码, 还能实现运行时的按需加载, 那么 webpack 是怎么做到的呢?本文通过研究 webpack 的输出文件来探讨同步引...</p>
223                    
224                </section>
225                <footer class="post-meta">
226                    <div class="post-tags">
227                        
228                            
229                            <a href=tags.html#webpack class="post-tag">webpack</a>
230                            
231                        
232                    </div>
233                    <time class="post-date" datetime="18-12-30">30 Dec 2018</time>
234                </footer>
235            </article>
236        
237            <article class="article-item">
238                
239                <div class="post-cover">
240                    <a class="post-link" href="/2018/11/12/react-native-1.html" title="react native 开发实践1 - 踩坑"></a>
241                    <img src="https://raw.githubusercontent.com/njleonzhang/image-bed/master/assets/9c247e5e-dc6f-283d-f9f8-493171cdc9f9.png" href="/2018/11/12/react-native-1.html" alt="">
242                </div>
243                
244                <section class="post-preview">
245                    <a class="post-link" href="/2018/11/12/react-native-1.html" title="react native 开发实践1 - 踩坑"></a>
246                    <h2 class="post-title">react native 开发实践1 - 踩坑</h2>
247                    
248                    
249                    <p class="post-excerpt">最近在用 react native 做一个小项目, 较为深度的体验了一下 react native 开发, 本文记录一下心得。本系列文章, 涉及 react native 的坑、调试、版本管理等方面。</p>
250                    
251                </section>
252                <footer class="post-meta">
253                    <div class="post-tags">
254                        
255                            
256                            <a href=tags.html#react-native class="post-tag">react-native</a>
257                            
258                        
259                    </div>
260                    <time class="post-date" datetime="18-11-12">12 Nov 2018</time>
261                </footer>
262            </article>
263        
264
265        
266            <nav class="pagination">
267    <input type="hidden" id="total_pages" value="4">
268    <input type="hidden" id="current_pages" value="1">
269    <input type="hidden" id="base_url" value="/">
270    <div class="page-links">
271        
272        <div id="page-link-container"></div>
273        
274        <a href="/page2/" class="page-link">&raquo;</a>
275        
276    </div>
277</nav>
278
279        
280
281    </div>
282
283    <aside class="g-sidebar-wrapper">
284        <div class="g-sidebar">
285            <section class="author-card">
286                <div class="avatar">
287                    <img src="/assets/img/profile.jpeg" alt="">
288                </div>
289                <div class="author-name" rel="author">Leon Zhang</div>
290                <div class="bio">
291                    <p>FED @ a startup<br/> Former engineer @citrix <br/> Former engineer @trendmicro</p>
292                </div>
293                
294                <ul id="sns-links" class="sns-links">
295                    
296                    <li>
297                        <a href="//weibo.com/u/1199856281" target="_blank">
298                            <i class="iconfont icon-weibo"></i>
299                        </a>
300                    </li>
301                    
302                    <li>
303                        <a href="//github.com/njleonzhang" target="_blank">
304                            <i class="iconfont icon-github"></i>
305                        </a>
306                    </li>
307                    
308                </ul>
309                
310            </section>
311
312            
313            <section class="tags-card">
314                
315                    
316                    <a href="tags.html#Django" class="tag">Django</a>
317                
318                    
319                    <a href="tags.html#frontend" class="tag">frontend</a>
320                
321                    
322                    <a href="tags.html#webpack" class="tag">webpack</a>
323                
324                    
325                    <a href="tags.html#karma" class="tag">karma</a>
326                
327                    
328                    <a href="tags.html#mocha" class="tag">mocha</a>
329                
330                    
331                    <a href="tags.html#typescript" class="tag">typescript</a>
332                
333                    
334                    <a href="tags.html#vue" class="tag">vue</a>
335                
336                    
337                    <a href="tags.html#SSR" class="tag">SSR</a>
338                
339                    
340                    <a href="tags.html#Misc" class="tag">Misc</a>
341                
342                    
343                    <a href="tags.html#vscode" class="tag">vscode</a>
344                
345                    
346                    <a href="tags.html#extension" class="tag">extension</a>
347                
348                    
349                    <a href="tags.html#rem" class="tag">rem</a>
350                
351                    
352                        
353            </section>
354            
355        </div>
356
357        
358        <div class="search-card">
359            <input id="search_input" type="text" placeholder="Search..." autocomplete="off">
360            <i class="iconfont icon-search"></i>
361            <div class="search_result"></div>
362        </div>
363        
364
365    </aside>
366
367</main>
368
369<footer class="g-footer">
370  <section>Blog of Leon Zhang ©
371  
372  
373    2018
374    -
375  
376  2023
377  </section>
378  <section>Powered by <a href="//jekyllrb.com">Jekyll</a> | <a href="https://github.com/kaeyleo/jekyll-theme-H2O">Theme H2O</a></section>
379</footer>
380
381
382    </div>
383    
383<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
383
384    
384<script src="/assets/js/prism.js"></script>
384
385    
385<script src="/assets/js/index.min.js"></script>
385
386</body>
387</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.