├── .gitignore ├── .vscode ├── launch.json └── settings.json ├── README.md ├── blog ├── JavaScript核心原理解析.md ├── vue3对比vue2.md └── 从0开始学架构.md ├── package-lock.json ├── package.json ├── post ├── HTTP协议原理+实践 │ └── README.md ├── Javascript忍者秘籍2 │ ├── 02.运行时的页面构建过程.md │ ├── 03.理解函数.md │ ├── 04.函数进阶:理解函数调用.md │ ├── 05.精通函数:闭包和作用域.md │ ├── 06.未来的函数:生成器和promise.md │ ├── 07.面向对象与原型.md │ ├── 08.控制对象的访问.md │ ├── 09.处理集合.md │ ├── 10.正则表达式.md │ ├── 11.代码模块化.md │ ├── 12.DOM操作.md │ ├── 13.历久弥新的事件.md │ ├── 14.跨浏览器开发技巧.md │ ├── 15.附录.md │ └── source │ │ ├── assert.html │ │ ├── match.html │ │ └── proxy.html ├── Javascript核心技术开发解密 │ ├── 01.三种基础数据结构 │ │ └── README.md │ ├── 02.内存空间 │ │ └── README.md │ ├── 03.执行上下文 │ │ └── README.md │ ├── 04.变量对象 │ │ ├── README.md │ │ └── src │ │ │ └── index.html │ ├── 05.作用域与作用域链 │ │ └── README.md │ ├── 06.闭包 │ │ ├── README.md │ │ └── src │ │ │ ├── README.md │ │ │ ├── demo1.html │ │ │ ├── demo2.html │ │ │ ├── demo3.html │ │ │ ├── demo4.html │ │ │ └── index.html │ ├── 07.this │ │ ├── README.md │ │ └── src │ │ │ └── demo1.html │ ├── 08.函数与函数式编程 │ │ ├── README.md │ │ └── src │ │ │ ├── demo1.html │ │ │ ├── demo1.js │ │ │ └── demo2.js │ ├── 09.面向对象 │ │ ├── README.md │ │ └── src │ │ │ ├── demo1.html │ │ │ ├── demo1.js │ │ │ ├── demo2.js │ │ │ ├── jQuery.simple.js │ │ │ ├── 拖拽 │ │ │ ├── drag.html │ │ │ ├── drag.jquery.js │ │ │ ├── drag.module.js │ │ │ └── drag.simple.js │ │ │ ├── 无缝滚动 │ │ │ ├── scroll.html │ │ │ ├── scroll.js │ │ │ └── scroll.module.js │ │ │ └── 选项卡 │ │ │ ├── tab.html │ │ │ ├── tab.js │ │ │ └── tab.module.js │ ├── 10.ES6 与模块化 │ │ ├── README.md │ │ └── src │ │ │ └── es6app │ │ │ ├── public │ │ │ └── index.html │ │ │ └── src │ │ │ ├── box.js │ │ │ ├── controlBtns │ │ │ ├── bdColor.js │ │ │ ├── bgColor.js │ │ │ ├── height.js │ │ │ ├── index.js │ │ │ ├── showBtn.js │ │ │ └── width.js │ │ │ ├── index.js │ │ │ ├── register.js │ │ │ ├── state.js │ │ │ └── utils.js │ └── README.md ├── Javascript高级程序设计 │ ├── 13-14 │ │ └── README.md │ ├── 15-20 │ │ └── README.md │ ├── 21-25 │ │ └── README.md │ ├── 4-6 │ │ └── README.md │ ├── 7-10 │ │ └── README.md │ └── README.md ├── Nodejs微服务 │ ├── 01.微服务架构.md │ ├── 02.基于Seneca和PM2构建Node.js微服务.md │ ├── 03.从单块软件到微服务.md │ ├── 04.编写你的第一个Node.js微服务.md │ └── source │ │ ├── index.js │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── report │ │ ├── email.js │ │ ├── index.js │ │ ├── post.js │ │ └── sms.js │ │ └── seneca │ │ ├── demo.js │ │ ├── minimal-plugin.js │ │ ├── plugin.js │ │ ├── sum.js │ │ ├── web.js │ │ └── word.js ├── Python学习笔记 │ ├── README.md │ └── source │ │ ├── Requests.py │ │ ├── followers.json │ │ ├── hello.py │ │ └── weixincrawler │ │ └── crawler.py ├── js基础 │ ├── 1.js基础知识(上).html │ ├── 1.js基础知识(下).html │ ├── 1.js基础知识(中).html │ ├── 2.JS-Web-API(上).html │ ├── 2.JS-Web-API(下).html │ ├── 3.开发环境.html │ ├── 4.运行环境.html │ ├── AMD │ │ ├── a-util.js │ │ ├── a.js │ │ ├── index.html │ │ ├── main.js │ │ └── util.js │ ├── CMD │ │ ├── dist │ │ │ └── bundle.js │ │ ├── index.html │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ ├── a-util.js │ │ │ └── app.js │ │ └── webpack.config.js │ ├── JS-Web-API(上).md │ ├── JS-Web-API(下).md │ ├── js基础知识(上).md │ ├── js基础知识(下).md │ ├── js基础知识(中).md │ ├── 原型对象.png │ ├── 开发环境.md │ └── 运行环境.md ├── js高级面试 │ ├── code │ │ ├── async │ │ │ ├── data.json │ │ │ ├── deferred.html │ │ │ ├── index.html │ │ │ └── promise.html │ │ ├── es6 │ │ │ ├── class │ │ │ │ ├── index.html │ │ │ │ └── index.js │ │ │ ├── rollup │ │ │ │ ├── .babelrc │ │ │ │ ├── build │ │ │ │ │ └── bundle.js │ │ │ │ ├── index.html │ │ │ │ ├── package.json │ │ │ │ ├── rollup.config.js │ │ │ │ └── src │ │ │ │ │ ├── index-1.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── util1.js │ │ │ │ │ └── util2.js │ │ │ ├── webpack-wfp │ │ │ │ ├── .babelrc │ │ │ │ ├── build │ │ │ │ │ └── bundle.js │ │ │ │ ├── index.html │ │ │ │ ├── package.json │ │ │ │ ├── src │ │ │ │ │ ├── index.js │ │ │ │ │ ├── util1.js │ │ │ │ │ └── util2.js │ │ │ │ └── webpack.config.js │ │ │ └── webpack │ │ │ │ ├── .babelrc │ │ │ │ ├── build │ │ │ │ └── bundle.js │ │ │ │ ├── index.html │ │ │ │ ├── package.json │ │ │ │ ├── src │ │ │ │ ├── index.js │ │ │ │ ├── util1.js │ │ │ │ └── util2.js │ │ │ │ └── webpack.config.js │ │ ├── framework │ │ │ ├── jsx-test │ │ │ │ ├── .babelrc │ │ │ │ ├── demo.jsx │ │ │ │ ├── package.json │ │ │ │ └── test.jsx │ │ │ ├── mvvm │ │ │ │ ├── defineProperty.html │ │ │ │ ├── demo.html │ │ │ │ ├── simplehtmlparser.html │ │ │ │ ├── simplehtmlparser.js │ │ │ │ ├── test.html │ │ │ │ ├── vue-2.5.13.js │ │ │ │ └── vue-2.5.9.js │ │ │ ├── preact.js │ │ │ ├── to-do-list │ │ │ │ ├── jquery │ │ │ │ │ └── index.html │ │ │ │ ├── react-test │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── README.md │ │ │ │ │ ├── package.json │ │ │ │ │ ├── public │ │ │ │ │ │ ├── favicon.ico │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── manifest.json │ │ │ │ │ └── src │ │ │ │ │ │ ├── App.css │ │ │ │ │ │ ├── App.js │ │ │ │ │ │ ├── App.test.js │ │ │ │ │ │ ├── components │ │ │ │ │ │ └── todo │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── input │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ └── list │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.css │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── logo.svg │ │ │ │ │ │ └── registerServiceWorker.js │ │ │ │ └── vue │ │ │ │ │ ├── demo.html │ │ │ │ │ ├── index.html │ │ │ │ │ └── vue-2.5.13.js │ │ │ └── vdom │ │ │ │ ├── diff │ │ │ │ ├── log1.txt │ │ │ │ └── log2.txt │ │ │ │ ├── jquery │ │ │ │ └── index.html │ │ │ │ ├── snabbdom │ │ │ │ ├── demo.html │ │ │ │ └── index.html │ │ │ │ └── source │ │ │ │ ├── createElement.js │ │ │ │ └── updateChildren.js │ │ ├── hybrid │ │ │ ├── invoke.js │ │ │ └── schema.html │ │ ├── index.txt │ │ └── prototype │ │ │ ├── jquery │ │ │ ├── demo.html │ │ │ ├── index.html │ │ │ ├── jquery-3.2.1.js │ │ │ └── my-jquery.js │ │ │ └── zepto │ │ │ ├── index.html │ │ │ ├── my-zepto.js │ │ │ └── zepto-1.2.0.js │ ├── demo.html │ ├── vue双向数据绑定(es5).html │ ├── vue双向数据绑定(es6).html │ ├── 实现简易react.js.html │ ├── 知识点.md │ └── 面向切面.html ├── one-light │ ├── 01.JavaScript │ │ ├── 01.预读班 │ │ │ ├── 01.你不知道的HTML.md │ │ │ ├── 02.CSS3构建3D的世界.md │ │ │ ├── 03.CSS高级实用技巧.md │ │ │ ├── 04.CSS与数学的巧妙运用.md │ │ │ ├── 05.ES5核心技术.md │ │ │ ├── 06.jQuery技术内幕.md │ │ │ ├── 07.走进后端工程师的世界.md │ │ │ ├── 08.常用后端语言的介绍.md │ │ │ └── README.md │ │ ├── 02.linux基础入门 │ │ │ └── README.md │ │ ├── 03.ECMAScript5.1新增语法 │ │ │ └── README.md │ │ ├── 04.php与mysql开发入门 │ │ │ ├── 01.PHP基础入门.md │ │ │ ├── 02.PHP面向对象.md │ │ │ ├── 03.PHP与MySQL操作.md │ │ │ └── README.md │ │ ├── 05.ES6 │ │ │ └── README.md │ │ ├── 06.深度实践课 │ │ │ ├── Javascript&QA.md │ │ │ ├── 01.JavaScript与QA工程师.md │ │ │ ├── JavaScript-Functional-Programming.md │ │ │ ├── Javascript语言新发展【深度实践课】.md │ │ │ ├── README.md │ │ │ ├── paper.md │ │ │ └── source │ │ │ │ ├── functional │ │ │ │ ├── Monad.js │ │ │ │ └── functional.js │ │ │ │ ├── index.html │ │ │ │ └── paper.js │ │ └── README.md │ ├── README.md │ └── other.md ├── webpck4初体验 │ ├── 01.webpack基本配置介绍.md │ ├── 02.配置loader.md │ ├── 03.配置plugin.md │ ├── 04.更好地使用 webpack-dev-server.md │ ├── 05.开发和生产环境的构建配置差异.md │ ├── 06.用 HMR 提高开发效率.md │ ├── 07.优化前端资源加载.md │ ├── 08.提升 webpack 的构建速度.md │ ├── 09.探究 webpack 内部工作流程.md │ ├── 10.创建自己的 loader.md │ ├── 11.创建自己的 plugin.md │ ├── 12.总结.md │ └── README.md ├── web前后端漏洞分析与防御 │ ├── source │ │ ├── project.zip │ │ └── t1eexx │ │ │ ├── .editorconfig │ │ │ ├── .eslintrc.js │ │ │ ├── .gitignore │ │ │ ├── controllers │ │ │ ├── site.js │ │ │ └── user.js │ │ │ ├── models │ │ │ └── connection.js │ │ │ ├── other │ │ │ ├── Untitled.sketch │ │ │ ├── clickhijack.html │ │ │ ├── clickhijack.png │ │ │ └── csrf.html │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── routes │ │ │ ├── site.js │ │ │ └── user.js │ │ │ ├── safety.sql │ │ │ ├── server.js │ │ │ ├── static │ │ │ ├── config.js │ │ │ ├── materialize │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── css │ │ │ │ │ ├── main.css │ │ │ │ │ ├── materialize.css │ │ │ │ │ └── materialize.min.css │ │ │ │ ├── fonts │ │ │ │ │ └── roboto │ │ │ │ │ │ ├── Roboto-Bold.eot │ │ │ │ │ │ ├── Roboto-Bold.ttf │ │ │ │ │ │ ├── Roboto-Bold.woff │ │ │ │ │ │ ├── Roboto-Bold.woff2 │ │ │ │ │ │ ├── Roboto-Light.eot │ │ │ │ │ │ ├── Roboto-Light.ttf │ │ │ │ │ │ ├── Roboto-Light.woff │ │ │ │ │ │ ├── Roboto-Light.woff2 │ │ │ │ │ │ ├── Roboto-Medium.eot │ │ │ │ │ │ ├── Roboto-Medium.ttf │ │ │ │ │ │ ├── Roboto-Medium.woff │ │ │ │ │ │ ├── Roboto-Medium.woff2 │ │ │ │ │ │ ├── Roboto-Regular.eot │ │ │ │ │ │ ├── Roboto-Regular.ttf │ │ │ │ │ │ ├── Roboto-Regular.woff │ │ │ │ │ │ ├── Roboto-Regular.woff2 │ │ │ │ │ │ ├── Roboto-Thin.eot │ │ │ │ │ │ ├── Roboto-Thin.ttf │ │ │ │ │ │ ├── Roboto-Thin.woff │ │ │ │ │ │ └── Roboto-Thin.woff2 │ │ │ │ └── js │ │ │ │ │ ├── materialize.js │ │ │ │ │ └── materialize.min.js │ │ │ └── scripts │ │ │ │ ├── login.js │ │ │ │ └── ui │ │ │ │ └── modal.js │ │ │ ├── todo.todo │ │ │ └── views │ │ │ ├── index.pug │ │ │ ├── login.pug │ │ │ └── post.pug │ ├── xss攻击原理.png │ ├── 前端安全.md │ ├── 明文密码泄露.png │ └── 确定服务器身份.png ├── 前端工程化 │ ├── 01.前端工程简史 │ │ └── README.md │ ├── 02.脚手架 │ │ └── README.md │ └── 03.构建 │ │ └── README.md ├── 前端性能优化 │ ├── serviceWorker │ │ ├── app.js │ │ ├── main.css │ │ ├── msg-demo.html │ │ ├── msgapp.js │ │ ├── msgsw.js │ │ ├── service-worker.js │ │ └── serviceWorker.html │ ├── workspace │ │ ├── css、js的加载与执行.pptx │ │ ├── indexDB.html │ │ ├── 图片相关的优化.pptx │ │ ├── 懒加载与预加载.pptx │ │ ├── 浏览器存储.pptx │ │ ├── 资源合并与压缩.pptx │ │ └── 重绘与回流.pptx │ ├── 前端性能优化.md │ └── 缓存 │ │ ├── app.js │ │ ├── assets │ │ └── view.jpg │ │ ├── config.js │ │ └── mime.js ├── 数据结构与算法 │ ├── 01.数组.md │ ├── 02.栈.md │ ├── 03.队列.md │ ├── 04.链表.md │ ├── 05.集合.md │ ├── 06.字典.md │ ├── 07.散列表.md │ ├── 08.树.md │ └── source │ │ ├── Dictionary.js │ │ ├── Hash.js │ │ ├── LinkList.js │ │ ├── Set.js │ │ └── Tree.js ├── 计算机组成原理+操作系统+计算机网络 │ ├── 01.计算机组成原理.md │ ├── 02.操作系统.md │ └── 03.计算机网络.md ├── 设计模式与开发实践 │ ├── 01.创建型设计模式 │ │ ├── 单例模式.md │ │ ├── 原型模式.md │ │ ├── 工厂方法模式.md │ │ ├── 建造者模式.md │ │ ├── 抽象工厂模式.md │ │ └── 简单工厂模式.md │ ├── 02.结构型设计模式 │ │ ├── 享元模式.md │ │ ├── 代理模式.md │ │ ├── 外观模式.md │ │ ├── 桥接模式.md │ │ ├── 组合模式.md │ │ ├── 装饰者模式.md │ │ └── 适配器模式.md │ ├── 03.行为型设计模式 │ │ ├── 命令模式.md │ │ ├── 模板方法模式.md │ │ ├── 状态模式.md │ │ ├── 策略模式.md │ │ ├── 职责链模式.md │ │ ├── 观察者模式.md │ │ └── 访问者模式.md │ ├── source │ │ ├── index.html │ │ ├── park.js │ │ └── park.png │ └── 面向对象的JS.md └── 高效前端:Web高效编程与优化实践 │ ├── Effective 14 │ └── 实现前端裁剪压缩图片.md │ ├── Effective 15 │ └── 实现跨浏览器的HTML5表单验证.md │ ├── Effective 26 │ └── 掌握前端本地文件操作与上传.md │ ├── Effective 27 │ └── src │ │ ├── img │ │ └── coder.jpg │ │ └── index.html │ ├── Effective 31 │ ├── src │ │ └── index.html │ └── 理解移动端click及自定义事件.md │ ├── Effective 32 │ ├── src │ │ ├── children.html │ │ ├── demo.js │ │ ├── index.html │ │ └── parent.html │ └── 学习JS高级技巧.md │ ├── Effective 33 │ ├── src │ │ ├── README.md │ │ ├── conf.js │ │ ├── demo.sh │ │ ├── karma.conf.js │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ └── util.js │ │ ├── test-spec.js │ │ ├── test │ │ │ └── util-test.js │ │ └── util-test │ │ │ └── index.js │ └── 前端的单元测试与自动化测试.md │ ├── README.md │ └── js │ └── list.js ├── source-learn ├── collect │ ├── aop.js │ ├── factorial.js │ ├── fib.js │ ├── index.html │ ├── stack.js │ └── template.js ├── es6 │ ├── es6.html │ └── es6.js ├── jQuery │ ├── README.md │ ├── ajax.js │ ├── index.html │ ├── jquery.js │ └── lsx-jquery.js ├── promise │ ├── README.md │ ├── demo.js │ ├── promise.html │ ├── promise.js │ ├── promise_done.js │ ├── v1.0_promise.js │ ├── v2.0_promise.js │ ├── v3.0_promise.js │ └── v4.0_promise.js ├── vscode.conf.js ├── vue源码分析 │ ├── README.md │ ├── demo │ │ ├── index.html │ │ ├── observe.js │ │ └── observe1.js │ ├── observe-demo │ │ ├── index.html │ │ ├── observe.js │ │ ├── proxy-demo.js │ │ └── proxy-observe.js │ ├── source │ │ ├── index.html │ │ ├── juejin │ │ │ ├── Vue流程图.xmind │ │ │ ├── 《Vuex状态管理的工作原理》.js │ │ │ ├── 《template 模板是怎样通过 Compile 编译的》.js │ │ │ ├── 《响应式系统的依赖收集追踪原理》.js │ │ │ ├── 《响应式系统的基本原理》.js │ │ │ ├── 《实现 Virtual DOM 下的一个 VNode 节点》.js │ │ │ ├── 《批量异步更新策略及 nextTick 原理》.js │ │ │ └── 《数据状态更新时的差异 diff 及 patch 机制》.js │ │ ├── reactive.js │ │ ├── state.js │ │ ├── vue-router-src │ │ │ ├── components │ │ │ │ ├── link.js │ │ │ │ └── view.js │ │ │ ├── create-matcher.js │ │ │ ├── create-route-map.js │ │ │ ├── history │ │ │ │ ├── abstract.js │ │ │ │ ├── base.js │ │ │ │ ├── hash.js │ │ │ │ └── html5.js │ │ │ ├── index.js │ │ │ ├── install.js │ │ │ └── util │ │ │ │ ├── async.js │ │ │ │ ├── dom.js │ │ │ │ ├── location.js │ │ │ │ ├── params.js │ │ │ │ ├── path.js │ │ │ │ ├── push-state.js │ │ │ │ ├── query.js │ │ │ │ ├── resolve-components.js │ │ │ │ ├── route.js │ │ │ │ ├── scroll.js │ │ │ │ └── warn.js │ │ ├── vue-src │ │ │ ├── compiler │ │ │ │ ├── codegen │ │ │ │ │ ├── events.js │ │ │ │ │ └── index.js │ │ │ │ ├── directives │ │ │ │ │ ├── bind.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── model.js │ │ │ │ ├── error-detector.js │ │ │ │ ├── helpers.js │ │ │ │ ├── index.js │ │ │ │ ├── optimizer.js │ │ │ │ └── parser │ │ │ │ │ ├── entity-decoder.js │ │ │ │ │ ├── filter-parser.js │ │ │ │ │ ├── html-parser.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── text-parser.js │ │ │ ├── core │ │ │ │ ├── components │ │ │ │ │ ├── index.js │ │ │ │ │ └── keep-alive.js │ │ │ │ ├── config.js │ │ │ │ ├── global-api │ │ │ │ │ ├── assets.js │ │ │ │ │ ├── extend.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── mixin.js │ │ │ │ │ └── use.js │ │ │ │ ├── index.js │ │ │ │ ├── instance │ │ │ │ │ ├── events.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── init.js │ │ │ │ │ ├── inject.js │ │ │ │ │ ├── lifecycle.js │ │ │ │ │ ├── proxy.js │ │ │ │ │ ├── render-helpers │ │ │ │ │ │ ├── bind-object-props.js │ │ │ │ │ │ ├── check-keycodes.js │ │ │ │ │ │ ├── render-list.js │ │ │ │ │ │ ├── render-slot.js │ │ │ │ │ │ ├── render-static.js │ │ │ │ │ │ ├── resolve-filter.js │ │ │ │ │ │ └── resolve-slots.js │ │ │ │ │ ├── render.js │ │ │ │ │ └── state.js │ │ │ │ ├── observer │ │ │ │ │ ├── array.js │ │ │ │ │ ├── dep.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── scheduler.js │ │ │ │ │ └── watcher.js │ │ │ │ ├── util │ │ │ │ │ ├── debug.js │ │ │ │ │ ├── env.js │ │ │ │ │ ├── error.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── lang.js │ │ │ │ │ ├── options.js │ │ │ │ │ ├── perf.js │ │ │ │ │ └── props.js │ │ │ │ └── vdom │ │ │ │ │ ├── create-component.js │ │ │ │ │ ├── create-element.js │ │ │ │ │ ├── create-functional-component.js │ │ │ │ │ ├── helpers │ │ │ │ │ ├── extract-props.js │ │ │ │ │ ├── get-first-component-child.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── merge-hook.js │ │ │ │ │ ├── normalize-children.js │ │ │ │ │ ├── resolve-async-component.js │ │ │ │ │ └── update-listeners.js │ │ │ │ │ ├── modules │ │ │ │ │ ├── directives.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── ref.js │ │ │ │ │ ├── patch.js │ │ │ │ │ └── vnode.js │ │ │ ├── platforms │ │ │ │ ├── web │ │ │ │ │ ├── compiler.js │ │ │ │ │ ├── compiler │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ ├── html.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ └── text.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ └── util.js │ │ │ │ │ ├── runtime-with-compiler.js │ │ │ │ │ ├── runtime.js │ │ │ │ │ ├── runtime │ │ │ │ │ │ ├── class-util.js │ │ │ │ │ │ ├── components │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── transition-group.js │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ │ └── show.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── style.js │ │ │ │ │ │ │ └── transition.js │ │ │ │ │ │ ├── node-ops.js │ │ │ │ │ │ ├── patch.js │ │ │ │ │ │ └── transition-util.js │ │ │ │ │ ├── server-renderer.js │ │ │ │ │ ├── server │ │ │ │ │ │ ├── directives │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── show.js │ │ │ │ │ │ ├── modules │ │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── style.js │ │ │ │ │ │ └── util.js │ │ │ │ │ └── util │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ ├── compat.js │ │ │ │ │ │ ├── element.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── style.js │ │ │ │ └── weex │ │ │ │ │ ├── compiler.js │ │ │ │ │ ├── compiler │ │ │ │ │ ├── directives │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── model.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── modules │ │ │ │ │ │ ├── append.js │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── props.js │ │ │ │ │ │ └── style.js │ │ │ │ │ ├── framework.js │ │ │ │ │ ├── runtime-factory.js │ │ │ │ │ ├── runtime │ │ │ │ │ ├── components │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── transition-group.js │ │ │ │ │ │ └── transition.js │ │ │ │ │ ├── directives │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── style.js │ │ │ │ │ │ └── transition.js │ │ │ │ │ ├── node-ops.js │ │ │ │ │ ├── patch.js │ │ │ │ │ └── text-node.js │ │ │ │ │ └── util │ │ │ │ │ └── index.js │ │ │ ├── server │ │ │ │ ├── bundle-renderer │ │ │ │ │ ├── create-bundle-renderer.js │ │ │ │ │ ├── create-bundle-runner.js │ │ │ │ │ └── source-map-support.js │ │ │ │ ├── create-renderer.js │ │ │ │ ├── render-context.js │ │ │ │ ├── render-stream.js │ │ │ │ ├── render.js │ │ │ │ ├── template-renderer │ │ │ │ │ ├── create-async-file-mapper.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── parse-template.js │ │ │ │ │ └── template-stream.js │ │ │ │ ├── util.js │ │ │ │ ├── webpack-plugin │ │ │ │ │ ├── client.js │ │ │ │ │ ├── server.js │ │ │ │ │ └── util.js │ │ │ │ └── write.js │ │ │ ├── sfc │ │ │ │ └── parser.js │ │ │ └── shared │ │ │ │ ├── constants.js │ │ │ │ └── util.js │ │ └── vuex-src │ │ │ ├── helpers.js │ │ │ ├── index.esm.js │ │ │ ├── index.js │ │ │ ├── mixin.js │ │ │ ├── module │ │ │ ├── module-collection.js │ │ │ └── module.js │ │ │ ├── plugins │ │ │ ├── devtool.js │ │ │ └── logger.js │ │ │ ├── store.js │ │ │ └── util.js │ ├── vue源码分析系列1.md │ ├── vue源码分析系列2.md │ ├── vue源码分析系列3.md │ ├── vue源码分析系列4.md │ └── vue源码分析系列5.md └── 配置命令行.txt └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | 63 | .DS_Store 64 | 65 | config/* 66 | !config/default.* -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "启动程序", 11 | "program": "${workspaceFolder}/index.js" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "/usr/local/opt/python/bin/python3.7", 3 | "python.linting.pylintEnabled": false 4 | } -------------------------------------------------------------------------------- /blog/vue3对比vue2.md: -------------------------------------------------------------------------------- 1 | 1. basic.js 2 | 2. setup.js 3 | -------------------------------------------------------------------------------- /blog/从0开始学架构.md: -------------------------------------------------------------------------------- 1 | # 从0开始学架构 2 | 3 | ## 架构到底是指什么? 4 | 5 | 对于技术人员来说,“架构”是一个再常见不过的词了。但如果深究一下“架构”到底指什么,大部分人也许并不一定能够准确地回答。例如: 6 | 7 | - 架构和框架是什么关系?有什么区别? 8 | - Linux 有架构,MySQL 有架构,JVM 也有架构,使用 Java 开发、MySQL 存储、跑在 Linux 上的业务系统也有架构,应该关注哪个架构呢? 9 | - 微信有架构,微信的登录系统也有架构,微信的支付系统也有架构,当我们谈微信架构时,到底是在谈什么架构? 10 | 11 | **系统与子系统** 12 | 13 | 子系统的定义和系统定义是一样的,只是观察的角度有差异,一个系统可能是另外一个更大系统的子系统。按照这个定义,系统和子系统比较容易理解。我们以微信为例来做一个分析。 14 | 15 | 1. 微信本身是一个系统,包含聊天、登录、支付、朋友圈等子系统。 16 | 2. 朋友圈这个系统又包括动态、评论、点赞等子系统。 17 | 3. 评论这个系统可能又包括防刷子系统、审核子系统、发布子系统、存储子系统。 18 | 4. 评论审核子系统不再包含业务意义上的子系统,而是包括各个模块或者组件,这些模块或者组件本身也是另外一个维度上的系统。例如,MySQL、Redis 等是存储系统,但不是业务子系统。 19 | 20 | **模块与组件** 21 | 22 | 模块和组件都是系统的组成部分,只是从不同的角度拆分系统而已。 23 | 24 | 从**逻辑的角度**来拆分系统后,得到的单元就是“模块”;从**物理的角度**来拆分系统后,得到的单元就是“组件”。划分模块的主要目的是职责分离;划分组件的主要目的是单元复用。 25 | 26 | > 架构是顶层设计;框架是面向编程或配置的半成品;组件是从技术维度上的复用;模块是从业务维度上职责的划分;系统是相互协同可运行的实体。 27 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Web-efficient-notes", 3 | "version": "1.0.0", 4 | "description": "Web高效编程阅读笔记整理", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/lsxlsxxslxsl/Web-efficient-notes.git" 12 | }, 13 | "keywords": [], 14 | "author": "", 15 | "license": "ISC", 16 | "bugs": { 17 | "url": "https://github.com/lsxlsxxslxsl/Web-efficient-notes/issues" 18 | }, 19 | "homepage": "https://github.com/lsxlsxxslxsl/Web-efficient-notes#readme", 20 | "dependencies": {}, 21 | "devDependencies": { 22 | "jasmine-core": "^3.1.0", 23 | "karma": "^2.0.5", 24 | "karma-chrome-launcher": "^2.2.0", 25 | "karma-coverage": "^1.1.2", 26 | "karma-jasmine": "^1.1.2" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /post/Javascript忍者秘籍2/02.运行时的页面构建过程.md: -------------------------------------------------------------------------------- 1 | # 02.运行时的页面构建过程 2 | 3 | - Web 应用的生命周期步骤 4 | - 从 HTML 代码到 Web 页面的处理过程 5 | - JavaScript 代码的执行顺序 6 | - 与事件交互 7 | - 事件循环 8 | 9 | ## 生命周期概览 10 | 11 | 典型客户端 Web 应用的生命周期从用户在浏览器地址栏输入一串 URL,或单击一 个链接开始。其过程如下: 12 | 13 | 1. 页面构建——创建用户界面; 14 | 2. 事件处理——进入循环从而等待事件的发生,发生后调用事件处理器。 15 | 3. 应用的生命周期随着用户关掉或离开页面而结束。 16 | 17 | ## 页面构建阶段 18 | 19 | 1. 解析 HTML 代码并构建文档对象模型 (DOM); 20 | 2. 执行 JavaScript 代码。 21 | 22 | ## 事件处理 23 | 24 | - 浏览器检查事件队列头; 25 | - 如果浏览器没有在队列中检测到事件,则继续检查; 26 | - 如果浏览器在队列头中检测到了事件,则取出该事件并执行相应的事件处理器(如果存在)。在这个过程中,余下的事件在事件队列中耐心等待,直到轮到它们被处理。 27 | 28 | ### 事件是异步的 29 | 30 | - 浏览器事件,例如当页面加载完成后或无法加载时; 31 | - 网络事件,例如来自服务器的响应(Ajax 事件和服务器端事件); 32 | - 用户事件,例如鼠标单击、鼠标移动和键盘事件; 33 | - 计时器事件,当 timeout 时间到期或又触发了一次时间间隔。 34 | 35 | ## 小结 36 | 37 | - 浏览器接收的 HTML 代码用作创建 DOM 的蓝图,它是客户端 Web 应用结构的 内部展示阶段。 38 | - 我们使用 JavaScript 代码来动态地修改 DOM 以便给 Web 应用带来动态行为。 39 | - 客户端 Web 应用的执行分为两个阶段。 40 | - 页面构建:用于创建DOM的,而全局JavaScript代码是遇到script节点时执行的。 41 | - 事件处理:在同一时刻,只能处理多个不同事件中的一个,处理顺序是事 件生成的顺序。事件处理阶段大量依赖事件队列,所有的事件都以其出现的 顺序存储在事件队列中。 -------------------------------------------------------------------------------- /post/Javascript忍者秘籍2/source/assert.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |AMD test
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /post/js基础/AMD/main.js: -------------------------------------------------------------------------------- 1 | require(['./a.js'], function(a) { 2 | var date = new Date() 3 | a.printDate(date) 4 | }) -------------------------------------------------------------------------------- /post/js基础/AMD/util.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | var util = { 3 | getFormatDate: function(date, type) { 4 | if (type === 1) { 5 | return '2017-06-20' 6 | } 7 | if (type === 2) { 8 | return '2017年6月20日' 9 | } 10 | } 11 | } 12 | return util 13 | }) -------------------------------------------------------------------------------- /post/js基础/CMD/dist/bundle.js: -------------------------------------------------------------------------------- 1 | !function(n){function t(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=n,t.c=r,t.d=function(n,r,e){t.o(n,r)||Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:e})},t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,"a",r),r},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=0)}([function(n,t,r){r(1).print()},function(n,t){n.exports={print:function(){console.log(123)}}}]); -------------------------------------------------------------------------------- /post/js基础/CMD/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |CMD test
9 |这是jquery插入的文字
') 5 | 6 | var aUtil = require('./a-util.js') 7 | aUtil.print() -------------------------------------------------------------------------------- /post/js基础/CMD/webpack.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var webpack = require('webpack') 3 | 4 | module.exports = { 5 | context: path.resolve(__dirname, './src'), 6 | entry: { 7 | app: './app.js' 8 | }, 9 | output: { 10 | path: path.resolve(__dirname, './dist'), 11 | filename: 'bundle.js' 12 | }, 13 | plugins: [ 14 | new webpack.optimize.UglifyJsPlugin() 15 | ] 16 | } -------------------------------------------------------------------------------- /post/js基础/JS-Web-API(上).md: -------------------------------------------------------------------------------- 1 | JS-Web-API(上) 2 | 3 | ·JS基础知识:ECMA262标准 4 | ·JS-Web-API:W3C标准 5 | 关于JS的规定: 6 | ·DOM操作 7 | ·BOM操作 8 | ·事件绑定 9 | ·ajax请求(包括http协议) 10 | ·存储 11 | 12 | ###DOM操作: 13 | Document 14 | Object 15 | Model 16 | ·题目 17 | ·DOM是哪种基本的数据结构 18 | ·DOM操作的常用API有哪些 19 | ·DOM节点的attr和property有何区别 20 | ·知识点 21 | ·DOM本质 22 | 23 |deferred test
9 | 10 | 11 | 50 | 51 | -------------------------------------------------------------------------------- /post/js高级面试/code/es6/class/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |构造函数测试
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /post/js高级面试/code/es6/class/index.js: -------------------------------------------------------------------------------- 1 | // function MathHandle(x, y) { 2 | // this.x = x 3 | // this.y = y 4 | // } 5 | 6 | // MathHandle.prototype.add = function () { 7 | // return this.x + this.y 8 | // } 9 | 10 | // var m = new MathHandle(1, 2) 11 | // // console.log(m.add()) 12 | 13 | // typeof MathHandle // 'function' 14 | // MathHandle.prototype.constructor === MathHandle // true 15 | // m.__proto__ === MathHandle.prototype // true 16 | 17 | // // 动物 18 | // function Animal() { 19 | // this.eat = function () { 20 | // alert('Animal eat') 21 | // } 22 | // } 23 | 24 | // // 狗 25 | // function Dog() { 26 | // this.bark = function () { 27 | // alert('Dog bark') 28 | // } 29 | // } 30 | 31 | // // 绑定原型,实现继承 32 | // Dog.prototype = new Animal() 33 | 34 | // var hashiqi = new Dog() 35 | // hashiqi.bark() 36 | // hashiqi.eat() 37 | 38 | function fn() { 39 | console.log('real', this) // real {a: 100} 40 | 41 | var arr = [1, 2, 3] 42 | arr.map(function (item) { 43 | console.log(this) // window 44 | }) 45 | } 46 | fn.call({a: 100}) 47 | 48 | // Window {postMessage: ƒ, blur: ƒ, focus: ƒ, close: ƒ, frames: Window, …} 49 | // Window {postMessage: ƒ, blur: ƒ, focus: ƒ, close: ƒ, frames: Window, …} 50 | // Window {postMessage: ƒ, blur: ƒ, focus: ƒ, close: ƒ, frames: Window, …} 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /post/js高级面试/code/es6/rollup/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["latest", { 4 | "es2015": { 5 | "modules": false 6 | } 7 | }] 8 | ], 9 | "plugins": ["external-helpers", "babel-plugin-transform-regenerator"] 10 | } -------------------------------------------------------------------------------- /post/js高级面试/code/es6/rollup/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |test
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /post/js高级面试/code/es6/rollup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rollup-wfp", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "rollup -c rollup.config.js" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "babel-core": "^6.26.0", 13 | "babel-plugin-external-helpers": "^6.22.0", 14 | "babel-plugin-syntax-async-functions": "^6.13.0", 15 | "babel-plugin-transform-runtime": "^6.23.0", 16 | "babel-polyfill": "^6.26.0", 17 | "babel-preset-latest": "^6.24.1", 18 | "babel-runtime": "^6.26.0", 19 | "rollup": "^0.52.3", 20 | "rollup-plugin-babel": "^3.0.3", 21 | "rollup-plugin-node-resolve": "^3.0.0" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /post/js高级面试/code/es6/rollup/rollup.config.js: -------------------------------------------------------------------------------- 1 | import babel from 'rollup-plugin-babel' 2 | import resolve from 'rollup-plugin-node-resolve' 3 | 4 | export default { 5 | entry: 'src/index.js', 6 | format: 'umd', 7 | plugins: [ 8 | resolve(), 9 | babel({ 10 | exclude: 'node_modules/**' 11 | }) 12 | ], 13 | dest: 'build/bundle.js' 14 | } -------------------------------------------------------------------------------- /post/js高级面试/code/es6/rollup/src/index-1.js: -------------------------------------------------------------------------------- 1 | // ES6 其他常用功能 2 | 3 | // var arr = [1, 2, 3]; 4 | // arr.map(function (item) { 5 | // return item + 1; 6 | // }) 7 | 8 | const arr = [1, 2, 3]; 9 | arr.map(item => item + 1); 10 | arr.map((item, index) => { 11 | console.log(item); 12 | return item + 1; 13 | }); -------------------------------------------------------------------------------- /post/js高级面试/code/es6/rollup/src/util1.js: -------------------------------------------------------------------------------- 1 | export default { 2 | a: 100 3 | } -------------------------------------------------------------------------------- /post/js高级面试/code/es6/rollup/src/util2.js: -------------------------------------------------------------------------------- 1 | export function fn1() { 2 | alert('fn1') 3 | } 4 | export function fn2() { 5 | alert('fn2') 6 | } -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack-wfp/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "latest"], 3 | "plugins": [] 4 | } -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack-wfp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |test
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack-wfp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webpack-wfp", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "babel-core": "^6.26.0", 14 | "babel-loader": "^7.1.2", 15 | "babel-preset-es2015": "^6.24.1", 16 | "babel-preset-latest": "^6.24.1", 17 | "webpack": "^3.11.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack-wfp/src/index.js: -------------------------------------------------------------------------------- 1 | import util1 from './util1.js' 2 | import { fn1, fn2 } from './util2.js' 3 | 4 | console.log(util1) 5 | fn1() 6 | fn2() 7 | 8 | // [1, 2, 3].map(item => item + 1) 9 | -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack-wfp/src/util1.js: -------------------------------------------------------------------------------- 1 | export default { 2 | a: 100 3 | } -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack-wfp/src/util2.js: -------------------------------------------------------------------------------- 1 | export function fn1() { 2 | alert('fn1') 3 | } 4 | 5 | export function fn2() { 6 | alert('fn2') 7 | } -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack-wfp/webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | entry: './src/index.js', 3 | output: { 4 | path: __dirname, 5 | filename: './build/bundle.js' 6 | }, 7 | module: { 8 | rules: [{ 9 | test: /\.js?$/, 10 | exclude: /(node_modules)/, 11 | loader: 'babel-loader' 12 | }] 13 | } 14 | } -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "latest"], 3 | "plugins": [] 4 | } -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |webpack test
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webpack-wfp", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "babel-core": "^6.26.0", 13 | "babel-loader": "^7.1.2", 14 | "babel-polyfill": "^6.26.0", 15 | "babel-preset-es2015": "^6.24.1", 16 | "babel-preset-latest": "^6.24.1", 17 | "webpack": "^3.10.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack/src/index.js: -------------------------------------------------------------------------------- 1 | // import util1 from './util1.js' 2 | // import { fn1, fn2 } from './util2.js' 3 | 4 | // console.log(util1) 5 | // fn1() 6 | // fn2() 7 | 8 | // // [1, 2, 3].map(item => item + 1) 9 | 10 | import 'babel-polyfill' 11 | 12 | function loadImg(src) { 13 | var promise = new Promise(function (resolve, reject) { 14 | var img = document.createElement('img') 15 | img.onload = function () { 16 | resolve(img) 17 | } 18 | img.onerror = function () { 19 | reject('图片加载失败') 20 | } 21 | img.src = src 22 | }) 23 | return promise 24 | } 25 | 26 | var src1 = 'https://www.imooc.com/static/img/index/logo_new.png' 27 | var src2 = 'https://img1.mukewang.com/545862fe00017c2602200220-100-100.jpg' 28 | 29 | const load = async function () { 30 | const result1 = await loadImg(src1) 31 | console.log(result1) 32 | const result2 = await loadImg(src2) 33 | console.log(result2) 34 | } 35 | load() 36 | 37 | -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack/src/util1.js: -------------------------------------------------------------------------------- 1 | export default { 2 | a: 100 3 | } -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack/src/util2.js: -------------------------------------------------------------------------------- 1 | export function fn1() { 2 | alert('fn1') 3 | } 4 | export function fn2() { 5 | alert('fn2') 6 | } -------------------------------------------------------------------------------- /post/js高级面试/code/es6/webpack/webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | entry: './src/index.js', 3 | output: { 4 | path: __dirname, 5 | filename: './build/bundle.js' 6 | }, 7 | module: { 8 | rules: [{ 9 | test: /\.js?$/, 10 | exclude: /(node_modules)/, 11 | loader: 'babel-loader' 12 | }] 13 | } 14 | } -------------------------------------------------------------------------------- /post/js高级面试/code/framework/jsx-test/.babelrc: -------------------------------------------------------------------------------- 1 | {"plugins": ["transform-react-jsx"]} -------------------------------------------------------------------------------- /post/js高级面试/code/framework/jsx-test/demo.jsx: -------------------------------------------------------------------------------- 1 | // import Input from './input/index.js' 2 | // import List from './list/index.js' 3 | 4 | // function render() { 5 | // return ( 6 | //this is demo
8 | // 9 | //{{price}}
11 |test
9 | 10 | 35 | 36 | -------------------------------------------------------------------------------- /post/js高级面试/code/framework/to-do-list/jquery/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |{{name}}
11 |{{age}}
12 |jquery test 1
9 |jquery test 2
10 |jquery test 3
11 | 12 |jquery test in div
14 |jquery test 1
9 |jquery test 2
10 |jquery test 3
11 | 12 |jquery test in div
14 |zepto test 1
9 |zepto test 2
10 |zepto test 3
11 | 12 |zepto test in div
14 |响应式 demo
13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /source-learn/vue源码分析/observe-demo/proxy-demo.js: -------------------------------------------------------------------------------- 1 | // const data = { 2 | // name: 'zhangsan', 3 | // age: 20, 4 | // } 5 | const data = ['a', 'b', 'c'] 6 | 7 | const proxyData = new Proxy(data, { 8 | get(target, key, receiver) { 9 | // 只处理本身(非原型的)属性 10 | const ownKeys = Reflect.ownKeys(target) 11 | if (ownKeys.includes(key)) { 12 | console.log('get', key) // 监听 13 | } 14 | 15 | const result = Reflect.get(target, key, receiver) 16 | return result // 返回结果 17 | }, 18 | set(target, key, val, receiver) { 19 | // 重复的数据,不处理 20 | if (val === target[key]) { 21 | return true 22 | } 23 | 24 | const result = Reflect.set(target, key, val, receiver) 25 | console.log('set', key, val) 26 | // console.log('result', result) // true 27 | return result // 是否设置成功 28 | }, 29 | deleteProperty(target, key) { 30 | const result = Reflect.deleteProperty(target, key) 31 | console.log('delete property', key) 32 | // console.log('result', result) // true 33 | return result // 是否删除成功 34 | } 35 | }) 36 | 37 | -------------------------------------------------------------------------------- /source-learn/vue源码分析/source/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |