{ "err_no": 0, "err_msg": "success", "data": { "booklet": { "booklet_id": "7053736179887243267", "base_info": { "id": 0, "booklet_id": "7053736179887243267", "title": "初探前端工程化", "price": 2990, "category_id": "6809637767543259144", "status": 1, "user_id": "1538971967685032", "verify_status": 2, "summary": "将工程化和前端开发结合,让开发事半功倍", "cover_img": "https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/db170489dd5c40b5a42ba61bfc8ac4ed~tplv-k3u1fbpfcp-watermark.image?", "section_count": 18, "section_ids": "7053736180017266721|7053775103619760132|7053775103753977894|7053775103514902560|7053801025311866912|7053837093335892001|7053837093474140164|7053846538509877287|7053846650791395331|7063010840965808128|7063010841292963880|7063018998459269161|7063025863863992335|7063025393049010216|7063026708789592079|7063027498438623232|7063029862688096291|7063029303344103465|7064193285396365346", "is_finished": 1, "ctime": 1642348392, "mtime": 1655694912, "put_on_time": 1645002025, "pull_off_time": -62135596800, "finished_time": -62135596800, "recycle_bin_time": -62135596800, "verify_time": -62135596800, "submit_time": 1655694912, "top_time": -62135596800, "wechat_group_img": "https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/1c00ca63f9e14812b3cf79c3cbc3f2f8~tplv-k3u1fbpfcp-watermark.image?", "wechat_group_desc": "", "wechat_group_signal": "前端工程216", "read_time": 17716, "buy_count": 1374, "course_type": 1, "background_img": "https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/a9c85360228e43c4afb806d59caec370~tplv-k3u1fbpfcp-watermark.image?", "is_distribution": 1, "distribution_img": "https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/c0c85d5a74dc45a4b93ff19818a0722b~tplv-k3u1fbpfcp-zoom-1.image?", "commission": 598, "can_vip_borrow": false, "is_sign": false }, "reading_progress": { "id": 0, "booklet_id": "7053736179887243267", "user_id": "3210229681503629", "status": 1, "buy_type": 1, "reading_end": 0, "reading_progress": 5, "last_section_id": "7053775103514902560", "has_update": 1, "last_rtime": 1645061009, "ctime": 1645060799, "mtime": 1658225139, "valid_begin_time": 0, "valid_end_time": 0, "borrow_times": 0 }, "user_info": { "user_id": "1538971967685032", "user_name": "sunshine小小倩", "company": "饿了么", "job_title": "资深前端工程师", "avatar_large": "https://p3-passport.byteacctimg.com/img/user-avatar/bb68979f992ac426cbd75574d25702ab~300x300.image", "level": 6, "description": "", "followee_count": 65, "follower_count": 18454, "post_article_count": 44, "digg_article_count": 516, "got_digg_count": 20402, "got_view_count": 834867, "post_shortmsg_count": 6, "digg_shortmsg_count": 19, "isfollowed": false, "favorable_author": 1, "power": 28657, "study_point": 0, "university": { "university_id": "0", "name": "", "logo": "" }, "major": { "major_id": "0", "parent_id": "0", "name": "" }, "student_status": 0, "select_event_count": 0, "select_online_course_count": 0, "identity": 0, "is_select_annual": true, "select_annual_rank": 0, "annual_list_type": 0, "extraMap": {}, "is_logout": 0, "annual_info": [], "account_amount": 0, "user_growth_info": { "user_id": 1538971967685032, "jpower": 0, "jscore": 799.1, "jpower_level": 0, "jscore_level": 5, "jscore_title": "先锋掘友", "author_achievement_list": [], "vip_level": 0, "vip_title": "" }, "is_vip": false }, "event_discount": null, "is_buy": true, "section_updated_count": 18, "is_new": false }, "introduction": { "id": 85933, "section_id": "7053736180017266721", "title": "小册介绍", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "

作者介绍

\n

\"作者简介.jpg\"

\n

sunshine小小倩,某一线互联网公司资深前端开发工程师。平时在工作中除了业务之外,还从事和前端基础建设相关的工作内容,包括团队 SOP 制定、内部组件库的搭建和维护,以及其他为开发提效的工作。同时,也有一些前端性能提升等工程化的实践。

\n

平时热衷于将自己的经验和踩过的坑跟大家分享,希望能给大家带来帮助。

\n

小册介绍

\n

\"课程介绍.jpg\"

\n

现在的前端开发已经和 5 年前的前端开发有着截然不同的要求。在 5 年前我刚毕业找第一份工作的时候就问了我一个问题:“页面上有一个 button,你能把上面的文案给改了吗?” 相信 5 年后的今天,你只会修改一个 button 的文案是找不到工作的。时至今日,大家在找工作的时候基础问题都是:“Vue 实现双向绑定的原理是什么?Webpack 是怎么进行打包的?plugin 和 loader 的区别是什么?……”

\n

前端开发最开始只是嵌入在模板引擎中对页面样式进行修改再加上一些简单的 DOM 操作,后来慢慢发展为可以处理复杂交互和业务逻辑。特别是随着 Ajax、Node 等新技术的发展,前端开发也逐渐具备了开发中大型业务的能力,这无疑标志着前端已经步入工程化的阶段

\n

这也意味着对我们的要求已经不再是“前端开发”,而是 “前端工程师”,时代要求我们要有工程化的思维和工程化解决问题的能力

\n

试想一下,某一天一个线上问题反馈说有的用户出现了白屏,你一通查找,结果发现是一个最新的语法在旧的浏览器上不支持。但是明明你的项目中用了 Babel 呀!打开编辑器,对着 babel.config.js 文件看了半天也没看出来个所以然来。于是你又打开 Google 搜索“怎么配置 Babel?”,会搜索到要安装一大堆 npm 包,配置 transform-runtime、babel-polyfill……按照第一篇文章配置之后,发现不生效,又换一篇文章,接着更改配置。终于,在快则 2 个小时,慢则一天的尝试之后,终于解决白屏问题了!此时,虽然你也不知道是改动的哪一行代码生效了,也不知道为什么要这么配置,但是知道要赶紧按下保存按钮,生怕修改了配置又出问题!并且祈祷下次千万不要有类似的问题报过来了!! 然后又匆匆忙忙重新回到项目中赶工期,至于出问题的原因,下次一定……下次一定……

\n

上面这个场景你是不是很熟悉?估计也戳到了很多技术人的痛处。这可能就是我们某些技术人开发的日常,被繁琐的 webpack 或者其他的 babel 、ts 的配置文件搞得一头雾水。总结来说,就是:

\n\n

以上的种种现象说明:你前端工程化的知识欠缺

\n

那么本小册将着重就现代前端开发,来详细介绍前端工程化的相关内容,并且带领大家用专业知识来解决前端工程问题,包括如何进行模块化、如何设计组件、如何提高代码的复用性、如何提升打包效率、如何做性能优化等。毕竟,现如今,只是会 HTML、CSS、JS 写写静态页面的时代已经过去了。

\n

本小册主要是从开发、构建和部署这三大阶段来构思的,整体的思维导图可参考如下:

\n

\"\"

\n

你会学到什么?

\n

期望大家学习完本小册之后,能够有以下收获:

\n\n

适宜人群

\n

本小册适合工作 1~3 年的初级前端工程师。比如,存在以下这些“症状”:

\n\n

购买须知

\n
    \n
  1. 本小册为图文形式内容服务,共计 18 节;
  2. \n
  3. 全部文章已更新完成;
  4. \n
  5. 购买用户可享有小册永久的阅读权限;
  6. \n
  7. 购买用户可进入小册微信群,与作者互动;
  8. \n
  9. 掘金小册为虚拟内容服务,一经购买成功概不退款;
  10. \n
  11. 掘金小册版权归北京北比信息技术有限公司所有,任何机构、媒体、网站或个人未经本网协议授权不得转载、链接、转贴或以其他方式复制发布/发表,违者将依法追究责任;
  12. \n
  13. 在掘金小册阅读过程中,如有任何问题,请邮件联系 xiaoce@xitu.io
  14. \n
", "draft_content": "", "draft_title": "小册介绍", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 232, "read_count": 0, "comment_count": 0, "ctime": 1642334998, "mtime": 1642334998, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": null }, "sections": [ { "id": 85934, "section_id": "7053775103619760132", "title": "开篇词:什么是前端工程?", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "开篇词:什么是前端工程?", "markdown_content": "", "markdown_show": "", "is_free": 1, "read_time": 328, "read_count": 6756, "comment_count": 34, "ctime": 1642334998, "mtime": 1642334998, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": null }, { "id": 85935, "section_id": "7053775103753977894", "title": "如何从 0 到 1 搭建一个现代前端项目?", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "如何从 0 到 1 搭建一个现代前端项目?", "markdown_content": "", "markdown_show": "", "is_free": 1, "read_time": 1153, "read_count": 5729, "comment_count": 47, "ctime": 1642341033, "mtime": 1642341033, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": null }, { "id": 85936, "section_id": "7053775103514902560", "title": "脚手架:提升团队开发利器", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "脚手架:提升团队开发利器", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 952, "read_count": 3933, "comment_count": 5, "ctime": 1642341051, "mtime": 1642341051, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": { "id": 0, "booklet_id": "7053736179887243267", "user_id": "3210229681503629", "section_id": "7053775103514902560", "reading_end": 0, "reading_progress": 100, "reading_position": 100, "has_update": 1, "last_rtime": 1645061009, "ctime": 1645060930, "mtime": 1658224613 } }, { "id": 85937, "section_id": "7053801025311866912", "title": "探索 npm 安装机制", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "探索 npm 安装机制", "markdown_content": "", "markdown_show": "", "is_free": 1, "read_time": 1246, "read_count": 3150, "comment_count": 25, "ctime": 1642341059, "mtime": 1642341059, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": null }, { "id": 85942, "section_id": "7053837093335892001", "title": "模块化:分治思想在前端的应用", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "模块化:分治思想在前端的应用", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 848, "read_count": 1749, "comment_count": 12, "ctime": 1642351630, "mtime": 1642351630, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": null }, { "id": 85943, "section_id": "7053837093474140164", "title": "组件化:为前端开发降本提效", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "组件化:为前端开发降本提效", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 1625, "read_count": 1398, "comment_count": 16, "ctime": 1642351645, "mtime": 1642351645, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": null }, { "id": 85944, "section_id": "7053846538509877287", "title": "团队协作规范(一):命名规范、UI 设计规范", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "团队协作规范(一):命名规范、UI 设计规范", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 1166, "read_count": 1375, "comment_count": 8, "ctime": 1642351656, "mtime": 1642351656, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": null }, { "id": 85945, "section_id": "7053846650791395331", "title": "团队协作规范(二):项目结构、workflow、git commit", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "团队协作规范(二):项目结构、workflow、git commit", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 704, "read_count": 1313, "comment_count": 3, "ctime": 1642351661, "mtime": 1642351661, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": null }, { "id": 86157, "section_id": "7063010840965808128", "title": "常见构建工具及其对比", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "常见构建工具及其对比", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 616, "read_count": 1230, "comment_count": 11, "ctime": 1644487260, "mtime": 1644487260, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": null }, { "id": 86158, "section_id": "7063010841292963880", "title": "Polyfill 垫片思想在前端的应用", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "Polyfill 垫片思想在前端的应用", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 447, "read_count": 1199, "comment_count": 9, "ctime": 1644488748, "mtime": 1644488748, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": null }, { "id": 86159, "section_id": "7063018998459269161", "title": "下一代 JS 编译器:Babel", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "下一代 JS 编译器:Babel", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 667, "read_count": 1307, "comment_count": 5, "ctime": 1644488858, "mtime": 1644488858, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": { "id": 0, "booklet_id": "7053736179887243267", "user_id": "3210229681503629", "section_id": "7063018998459269161", "reading_end": 0, "reading_progress": 0, "reading_position": 0, "has_update": 1, "last_rtime": 1645424283, "ctime": 1645424283, "mtime": 1658224613 } }, { "id": 86160, "section_id": "7063025863863992335", "title": "在 Babel 中使用 Polyfill", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "在 Babel 中使用 Polyfill", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 1098, "read_count": 1015, "comment_count": 10, "ctime": 1644489055, "mtime": 1644489055, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": { "id": 0, "booklet_id": "7053736179887243267", "user_id": "3210229681503629", "section_id": "7063025863863992335", "reading_end": 0, "reading_progress": 0, "reading_position": 0, "has_update": 1, "last_rtime": 1645424340, "ctime": 1645424340, "mtime": 1658224613 } }, { "id": 86161, "section_id": "7063025393049010216", "title": "优化 webpack 配置(一):提升开发体验", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "优化 webpack 配置(一):提升开发体验", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 1320, "read_count": 1248, "comment_count": 6, "ctime": 1644489239, "mtime": 1644489239, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": { "id": 0, "booklet_id": "7053736179887243267", "user_id": "3210229681503629", "section_id": "7063025393049010216", "reading_end": 0, "reading_progress": 0, "reading_position": 0, "has_update": 1, "last_rtime": 1646018230, "ctime": 1646018230, "mtime": 1658224619 } }, { "id": 86162, "section_id": "7063026708789592079", "title": "优化 webpack 配置(二):提升构建产物质量", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "优化 webpack 配置(二):提升构建产物质量", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 869, "read_count": 943, "comment_count": 1, "ctime": 1644489659, "mtime": 1644489659, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": { "id": 0, "booklet_id": "7053736179887243267", "user_id": "3210229681503629", "section_id": "7063026708789592079", "reading_end": 0, "reading_progress": 0, "reading_position": 0, "has_update": 1, "last_rtime": 1646018234, "ctime": 1646018234, "mtime": 1658224619 } }, { "id": 86163, "section_id": "7063027498438623232", "title": "下一代构建方案:no-bundle 构建", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "下一代构建方案:no-bundle 构建", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 2029, "read_count": 908, "comment_count": 3, "ctime": 1644489789, "mtime": 1644489789, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": { "id": 0, "booklet_id": "7053736179887243267", "user_id": "3210229681503629", "section_id": "7063027498438623232", "reading_end": 0, "reading_progress": 0, "reading_position": 0, "has_update": 1, "last_rtime": 1647516107, "ctime": 1647516107, "mtime": 1658224619 } }, { "id": 86164, "section_id": "7063029862688096291", "title": "软件开发“最后一公里”:持续集成和持续部署", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "软件开发“最后一公里”:持续集成和持续部署", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 585, "read_count": 915, "comment_count": 9, "ctime": 1644503049, "mtime": 1644503049, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": { "id": 0, "booklet_id": "7053736179887243267", "user_id": "3210229681503629", "section_id": "7063029862688096291", "reading_end": 0, "reading_progress": 0, "reading_position": 0, "has_update": 1, "last_rtime": 1647516114, "ctime": 1647516114, "mtime": 1658224619 } }, { "id": 86165, "section_id": "7063029303344103465", "title": "容器化部署方案:Docker ", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "容器化部署方案:Docker ", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 1083, "read_count": 1089, "comment_count": 1, "ctime": 1644503056, "mtime": 1644503056, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": { "id": 0, "booklet_id": "7053736179887243267", "user_id": "3210229681503629", "section_id": "7063029303344103465", "reading_end": 0, "reading_progress": 0, "reading_position": 0, "has_update": 1, "last_rtime": 1647516117, "ctime": 1647516117, "mtime": 1658224619 } }, { "id": 86194, "section_id": "7064193285396365346", "title": "结束语:未来展望", "user_id": "1538971967685032", "booklet_id": "7053736179887243267", "status": 1, "content": "", "draft_content": "", "draft_title": "结束语:未来展望", "markdown_content": "", "markdown_show": "", "is_free": 0, "read_time": 731, "read_count": 643, "comment_count": 7, "ctime": 1644767757, "mtime": 1644767757, "is_update": 0, "draft_read_time": 0, "vid": "", "reading_progress": { "id": 0, "booklet_id": "7053736179887243267", "user_id": "3210229681503629", "section_id": "7064193285396365346", "reading_end": 0, "reading_progress": 0, "reading_position": 0, "has_update": 1, "last_rtime": 1648435905, "ctime": 1648435905, "mtime": 1658224619 } } ] } }