js-stack-from-scratch README

The project's README from github.com/verekia/js-stack-from-scratch. As one markdown file: README.md.

JavaScript Stack from Scratch

Build Status Release Gitter

React Redux React Router Flow ESLint Jest Yarn Webpack

Welcome to my modern JavaScript stack tutorial: JavaScript Stack from Scratch.

🎉 This is the V2 of the tutorial, major changes happened since the 2016 release. Check the Change Log!

This is a straight-to-the-point guide to assembling a JavaScript stack. It requires some general programming knowledge, and JavaScript basics. It focuses on wiring tools together and giving you the simplest possible example for each tool. You can see this tutorial as a way to write your own boilerplate from scratch. Since the goal of this tutorial is to assemble various tools, I do not go into details about how these tools work individually. Refer to their documentation or find other tutorials if you want to acquire deeper knowledge in them.

You don't need to use this entire stack if you build a simple web page with a few JS interactions of course (a combination of Browserify/Webpack + Babel + jQuery is enough to be able to write ES6 code in different files), but if you want to build a web app that scales, and need help setting things up, this tutorial will work great for you.

A big chunk of the stack described in this tutorial uses React. If you are beginning and just want to learn React, create-react-app will get you up and running with a React environment very quickly with a pre-made configuration. I would for instance recommend this approach to someone who arrives in a team that's using React and needs to catch up with a learning playground. In this tutorial you won't use a pre-made configuration, because I want you to understand everything that's happening under the hood.

Code examples are available for each chapter, and you can run them all with yarn && yarn start. I recommend writing everything from scratch yourself by following the step-by-step instructions though.

Final code available in the JS-Stack-Boilerplate repository, and in the releases. There is a live demo too.

Works on Linux, macOS, and Windows.

Note: Since the tutorial was last edited in May 2017, a few libraries have slightly changed their APIs. 95% of the tutorial is still perfectly valid, but if you run into something weird, make sure to check out the open issues.

Table of contents

01 - Node, Yarn, package.json

02 - Babel, ES6, ESLint, Flow, Jest, Husky

03 - Express, Nodemon, PM2

04 - Webpack, React, HMR

05 - Redux, Immutable, Fetch

06 - React Router, Server-Side Rendering, Helmet

07 - Socket.IO

08 - Bootstrap, JSS

09 - Travis, Coveralls, Heroku

Coming up next

Setting up your editor (Atom first), MongoDB, Progressive Web App, E2E testing.

Translations

If you want to add your translation, please read the translation recommendations to get started!

V2

Check out the ongoing translations.

V1

Credits

Created by @verekia – verekia.com.

License: MIT

js-stack-from-scratch (verekia/js-stack-from-scratch)

Searching Database…

这是什么?一份手把手的教程,带你从零搭建一套现代 JavaScript 网页应用技术栈——从 Node 和 Yarn 开始,经过 React、Redux 和服务端渲染,一直讲到部署到 Heroku。
它是一个可以安装的框架或库吗?都不是——它是一份文字教程。每一章都配有可运行的代码示例,最终成果放在单独的 JS-Stack-Boilerplate 仓库里,所以学完你会得到属于自己的脚手架。
我该怎么学它?跟着九章逐步式章节,自己动手写代码。每章都附带一个可运行的示例——用 yarn && yarn start 就能启动——而且所有内容在 Linux、macOS 和 Windows 上都能跑。
我得是个有经验的 JavaScript 开发者才能学吗?需要有一般的编程基础和 JavaScript 基础。教程刻意不深入讲解各个工具的内部原理——重点在于把它们组装起来,想深入了解某个工具请查阅它的官方文档。
这份教程还不过时吗?还是已经老了?它最后更新于 2017 年 5 月,所以有些库的 API 略有变化。作者估计 95% 的内容依然有效,并指出哪里看起来不对劲时可以去看仓库里未关闭的 issue。
做小网站用它是不是杀鸡用牛刀?它是不是面向更大的应用?它面向的是需要扩展的网页应用。README 里说,对于只带一点 JS 的简单页面,Browserify/Webpack + Babel + jQuery 就够了,所以全套技术栈在那种场景下确实太重了。
为什么要手动搭建技术栈,而不是直接用 create-react-app?README 里其实也推荐:如果你只是想快速上手 React,用 create-react-app 就行。这份教程走的是相反的路:不用现成配置,这样你才能理解底层发生的每一件事。
这套技术栈涵盖哪些工具?共九章:Node/Yarn;Babel、ESLint、Flow、Jest、Husky;Express、Nodemon、PM2;Webpack、React、HMR;Redux、Immutable、Fetch;React Router、SSR、Helmet;Socket.IO;Bootstrap、JSS;Travis、Coveralls、Heroku。
我可以跳过打字环节,直接看最终成果吗?可以——最终代码在单独的 JS-Stack-Boilerplate 仓库和 releases 里,还有一个在线演示。不过作者仍然建议你逐章亲手把代码敲一遍。
这份教程有其他语言的版本吗?有——V2 有社区翻译的保加利亚语、简体中文、法语、意大利语和波兰语版本;更早的 V1 还被翻译成了日语、俄语和泰语。
Creator
verekia
Size
1.8 MB
Stars
20.1K
Age
10y
Commits · 90 Days