2016年2017年 之后,欢迎来到第三届 JavaScript 明星项目!

是时候回顾 2018 年 Javascript 领域的发展与变化了。

通过对比各项目过去 12 个月在 GitHub 上新增 star 数量,来评估其在 2018 年度的受关注程度,进而选出 2018 年度 JavaScript 领域崛起的明星项目。


下列图表对比了各个项目在 GitHub 上于过去 12 个月新增的 star 数量。分析的数据来源为 Best of JS 网站 ,一个 WEB 领域优秀项目的精选网站。通过点击项目,可以查看更多信息。

最受欢迎项目

1
Vue.js

Vue.js

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
+45.3k

2018 趋势

3.9k
2.9k
3.9k
3.7k
3.3k
9.7k
3.6k
3.3k
2.7k
2.5k
3.0k
2.8k
1月
2月
3月
4月
5月
6月
7月
8月
9月
10月
11月
12月

GitHub 数据

  • 创建于
    2013-07
  • star 总数
    124.1k

链接

2
React

React

A declarative, efficient, and flexible JavaScript library for building user interfaces.
+34.2k
3
VS Code

VS Code

Visual Studio Code
+25.2k
4
Deno

Deno

A secure TypeScript runtime on V8
+21.6k
5
Puppeteer

Puppeteer

Headless Chrome Node API
+21.4k
6
Create React App

Create React App

Set up a modern web app by running one command.
+21.2k
7
Axios

Axios

Promise based HTTP client for the browser and node.js
+19.9k
8
Ant Design

Ant Design

🐜 A UI Design Language
+18.5k
9
Vue Element Admin

Vue Element Admin

A magical vue admin
+17.3k
10
Storybook

Storybook

Interactive UI component dev & test: React, React Native, Vue, Angular, Ember
+15.1k

No translation for this path: "all"

前端框架

1
Vue.js

Vue.js

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
+45.3k
2
React

React

A declarative, efficient, and flexible JavaScript library for building user interfaces.
+34.2k
3
Angular

Angular

One framework. Mobile & desktop.
+12.4k
4
Hyperapp

Hyperapp

1 kB JavaScript micro-framework for building declarative web applications
+7.6k
5
Omi

Omi

Next generation web framework using web components with omio fallback(IE8+) in tiny js.
+5.1k

在前端框架方面,主导者还是和 2017 年一样的三位:Vue.jsReactAngular

如果你展开图表,你会注意到六月 Vue.js 和 React 都有一个小高峰。是什么原因?那时正值 Vue.js 总 star 数超过 React,成为 UI 框架类别中最受欢迎的项目。那时候,双方的粉丝都在为他们心目中的冠军拉票!

2018 年的新秀是 Omi,一个运用了 Shadow DOM 技术的、大有前途的 UI 框架,同时采用了 React 开发者们熟知的 “JSX” 语法。

Node.js 框架

1
Next.js

Next.js

The React Framework
+12.6k
2
Nuxt

Nuxt

The Vue.js Developers Framework
+8.7k
3
Nest

Nest

A progressive Node.js framework for building efficient and scalable server-side applications on top
+8.4k
4
Express

Express

Fast, unopinionated, minimalist web framework for node.
+5.8k
5
Koa

Koa

Expressive middleware for node.js using ES2017 async functions
+5.5k

在 2018 年中领跑的两个 Node.js 框架是基于特定前端框架的“全栈框架”。

它们都保证了良好的单页应用(SPA)开发体验,并支持服务端渲染(SSR)。

位于第 4 的是 Express,2017 年的第一名,尽管它“年事已高”,依然十分流行。

React 生态圈

1
Create React App

Create React App

Set up a modern web app by running one command.
+21.2k
2
Ant Design

Ant Design

🐜 A UI Design Language
+18.5k
3
Gatsby

Gatsby

Build blazing fast, modern apps and websites with React
+13.0k
4
Next.js

Next.js

The React Framework
+12.6k
5
Material UI

Material UI

React components that implement Google's Material Design.
+11.4k

不出意外,在 React 生态圈类别,2018 年的头号项目是 Create React App,创建新 React 项目的事实上的工具。

其第 2 版在 2018 年发布,是一次大版本更新,改动包括内置 Webpack 4,以及使用 TypeScript 的可能性。

对于 React 本身,主要变动在于引入了 hooks,它或许能够改变我们对于状态管理的处理方式,以及调整 React 中的副作用。

Vue 生态圈

1
Vue Element Admin

Vue Element Admin

A magical vue admin
+17.3k
2
Element

Element

A Vue.js 2.0 UI Toolkit for Web
+12.4k
3
VuePress

VuePress

📝 Minimalistic Vue-powered static site generator
+10.4k
4
vue-cli

vue-cli

🛠️ Standard Tooling for Vue.js Development
+9.8k
5
Nuxt

Nuxt

The Vue.js Developers Framework
+8.7k

Vue.js 的势头还在增长,第 3 个大版本 计划发挥出现代浏览器的优势,以便更高效地运行和更易于使用。

Vue Element Admin,Vue.js 生态圈最流行的项目,是使用 Vue.js 组件构建漂亮的仪表板的解决方案。

vue-cli 是使用现代 JavaScript 工具构建一个新的 Vue.js 应用程序的标准解决方案。

它能够和 React 的 Create React App 相提并论,但它更灵活并提供了一个图形化的UI界面,使得它非常方便用户。

Angular 生态圈

1
Angular CLI

Angular CLI

CLI tool for Angular
+5.9k
2
ngx-admin

ngx-admin

Admin dashboard template based on Angular 7+, Bootstrap 4 (previously known as ng2-admin)
+4.8k
3
Material Design for Angular

Material Design for Angular

Material Design components for Angular
+4.3k
4
NgRx

NgRx

Reactive libraries for Angular
+2.5k
5
NG-ZORRO

NG-ZORRO

An enterprise-class UI components based on Ant Design and Angular 7. 🐜
+2.2k

2018 年,在 Angular 生态圈中,不只一个而是有两个大版本更新!

Angular version 6 推出于五月,提供了很多和工具化相关的功能。

因此,在 Angular 生态圈中,最流行的项目是官方的命令行工具 Angular CLI,用于搭建新项目和管理现有项目。

在这些新功能中,update 命令使更新应用和依赖变得容易。此外,现在可以在不 "ejecting" 的情况下调整底层 Webpack 配置。

Angular version 7 于十月发布。

包含了 Angular CLI prompts,以及 Material Design for Angular 的更新,并侧重性能提升,包括一个称为“虚拟滚动”(Virtual Scrolling)的特性。

移动开发

1
React Native

React Native

A framework for building native apps with React.
+14.6k
2
Weex

Weex

A framework for building Mobile cross-platform UI.
+4.4k
3
NativeScript

NativeScript

NativeScript is an open source framework for building truly native mobile apps with JavaScript. Use
+3.8k
4
Quasar

Quasar

Quasar Framework
+3.6k
5
Ionic

Ionic

Build amazing native and progressive web apps with open web technologies. One app running on everyth
+3.5k

React Native 依然是使用 JavaScript 语言创建移动端应用的主要解决方案。

Airbnb 最近发布了一系列完整的文章解释了为什么他们决定在下一个产品中抛弃 React Native 转而开发原生 Apps。

对于那些希望使用 Vue.js 而不是 React 的人们来说,这儿也有一些选择。

以下四个本类别中的项目(WeexNativeScriptQuasarIonic)全都支持 Vue.js 作为视图层来构建移动端应用。

来自 Google 的 Flutter 虽然不是 JavaScript 语言的项目(因为它使用 Dart 编程语言), 但对于构建跨环境移动端应用,它也是一个很棒的备选方案。

编译工具

1
TypeScript

TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
+13.6k
2
Babel

Babel

🐠 Babel is a compiler for writing next generation JavaScript.
+6.3k
3
Flow

Flow

Adds static typing to JavaScript to improve developer productivity and code quality.
+3.8k
4
Reason

Reason

Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
+2.8k
5
Purescript

Purescript

A strongly-typed language that compiles to Javascript
+1.0k

我们过去曾讨论在 JavaScript 中引入静态类型的最佳方案。

到了 2018 年,看起来微软的 TypeScript 大幅领先了其主要竞争对手 —— Facebook 的 Flow

实际上,支持 TypeScript 的最新版 Babel 是一个搅局者。 在 create-react-app 2.1 及后续版本中,TypeScript 能够在 React 应用里开箱即用。

TypeScript 几乎是一个开发标准了:无论对于后端还是前端开发来说,我们看到越来越多的项目包含了 TypeScript 声明。而且,如果某些库自身不带类型声明,那么名为 definitelytyped 的项目会为大量的那些库提供类型声明。

构建工具

1
Parcel

Parcel

📦🚀 Blazing fast, zero configuration web application bundler
+14.9k
2
Webpack

Webpack

A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting a
+10.7k
3
Rollup

Rollup

Next-generation ES module bundler
+3.2k
4
Gulp

Gulp

The streaming build system
+2.5k
5
Poi

Poi

:zap: A zero-config bundler for JavaScript applications.
+1.3k

Parcel 证实了它在 2017 年的成功,开发者们喜欢零配置建立一个新项目的能力。

Webpack 依然是最流行和最灵活的构建工具,Create React Appvue-cliAngular CLI 都在内部使用它。Webpack 4 包含性能优化(涉及构建耗时和打包体积)以及“合理的默认值”,这使得 Webpack 也可以零配置使用。

测试框架

1
Jest

Jest

Delightful JavaScript Testing.
+8.1k
2
AVA

AVA

🚀 Testing can be a drag. AVA helps you get it done.
+3.1k
3
Mocha

Mocha

☕️ simple, flexible, fun javascript test framework for node.js & the browser
+2.6k
4
Jasmine

Jasmine

Simple JavaScript testing framework for browsers and node.js
+911
5
Tape

Tape

tap-producing test harness for node and browsers
+533

2018 年中测试框架领域总体没有什么变化,5 个领先的解决方案保持了和 2017 年相同的排名。

Jest 比竞争者们进步更快,开发者们喜欢 Fackbook 的全功能测试框架所带来的效用 —— 无论是在前端(它最初被打算用于测试 React 组件)还是后端使用,而且它是零配置的。

IDE 和编辑器

1
VS Code

VS Code

Visual Studio Code
+25.2k
2
Atom

Atom

:atom: The hackable text editor
+4.9k
3
Theia

Theia

Theia is a cloud & desktop IDE framework implemented in TypeScript.
+1.2k
4
Reactide

Reactide

Reactide is the first dedicated IDE for React web application development. http://reactide.io
+1.1k
5
Brackets

Brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
+951

VS Code,全类别里第 3 流行的项目,几乎就是用于 web 开发的事实上的 IDE 了。

它依靠自动补全功能和自带 TypeScript 集成站稳了脚跟。

杀手级功能可能就是对于 Node.js 的调试能力了吧。

CSS in JavaScript

1
Styled Components

Styled Components

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without
+8.9k
2
Emotion

Emotion

CSS-in-JS library designed for high performance style composition
+3.9k
3
CSS Modules

CSS Modules

Documentation about css-modules
+2.5k
4
Linaria

Linaria

Zero-runtime CSS in JS library
+1.7k
5
Polished

Polished

A lightweight toolset for writing styles in JavaScript ✨
+1.5k

虽然目前,对于基于组件的现代前端应用,什么才是最好的样式化方案,还没有定论(无论 React,Vue.js 还是 Angular)。

但是 Styled Components 依然有着最好的势头,看起来是最受欢迎的“组件样式化”解决方案。

静态网站生成器

1
Gatsby

Gatsby

Build blazing fast, modern apps and websites with React
+13.0k
2
Next.js

Next.js

The React Framework
+12.6k
3
VuePress

VuePress

📝 Minimalistic Vue-powered static site generator
+10.4k
4
Nuxt

Nuxt

The Vue.js Developers Framework
+8.7k
5
Hexo

Hexo

A fast, simple & powerful blog framework, powered by Node.js.
+4.8k

和 2017 年一样,Gatsby 在 2018 年依然是最受欢迎的静态站点生成器(用于生成一组 HTML JavaScript 和 CSS 文件,以便能够在任意地方托管,超快响应 —— 的一种工具)。

Gatsby 的亮点在于它的多面性(你能结合单页应用和静态站点的优点)以及对性能的关注。

如果你希望使用 Vue.js 而不是 React,那么位于第 3、4 名的 VuePressNuxt 或许是恰当的选择。

GraphQL

1
Gatsby

Gatsby

Build blazing fast, modern apps and websites with React
+13.0k
2
Prisma

Prisma

⚡️ Prisma enables seamless type-safe database access & declarative data modeling
+8.0k
3
Apollo client

Apollo client

:rocket: A fully-featured, production ready caching GraphQL client for every UI framework and GraphQ
+4.2k
4
GraphQL

GraphQL

GraphQL is a query language and execution engine tied to any backend service.
+3.7k
5
Apollo Server

Apollo Server

🌍 GraphQL server for Express, Connect, Hapi, Koa and more
+3.2k

GraphQL 生态圈正在高速发展,并且有一个大趋势是: 一些工具的出现能够简化 GraphQL 的配置过程。

Gatsby 依然是第一名,而且它绝对是最易上手使用 GraphQL 的工具之一。

从 Graphcool 演变而来的 Prisma 位于第二。与此同时,Hasura GraphQL Engine 还可以帮你直接从数据库生成一个能运作的后端。

前 15 名的其余部分,包括 GraphQL 服务端、客户端、以及各种其他工具 —— 比如 GraphQL Playground。

学习资源

1
JS Algorithms & Data Structures

JS Algorithms & Data Structures

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further r
+39.0k
2
30 seconds of code

30 seconds of code

Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.
+21.9k
3
You Don't Know JS

You Don't Know JS

A book series on JavaScript. @YDKJS on twitter.
+21.0k
4
Airbnb Style Guide

Airbnb Style Guide

JavaScript Style Guide
+16.4k
5
Node.js Best Practices

Node.js Best Practices

The largest Node.js best practices list (January 2019)
+10.3k

Angelos Chalaris ,本年度最成功的项目之一: 30 seconds of code 的主要维护者。那是一个代码片段的集合(JavaScript snippets),简洁并且注释清晰。

一个学习 JavaScript 的好方法!

Guest Writer angelos

随着 JavaScript 的热门程度不断增加,许多旨在帮助开发人员逐渐精通本语言及其复杂生态系统的学习资源也在不断增加。

2018 年最热门的学习资源大致可以分为两类:教程与速查、指南与最佳实践。

前者形式的项目例如: 30 秒代码你不知道的 JSJS 算法与数据结构。这些项目提供免费高质量的学习资料,通过实例诠释了编程概念和一些 JavaScript 的特定细节,使得开发人员逐渐加深对 JavaScript 生态的理解并编写出可靠的代码。

后者形式的项目例如: Airbnb 风格指南Node.js 最佳实践前端清单。像这样的资源帮助开发团队维护 Javascript 项目,同时保持代码风格的一致性,以及确保代码库易于理解,这反过来也允许新的贡献者加入这些社区并帮助他们成长。

总结

回顾 2018年,JavaScript 社区最大的事件或许是十一月的 Event-stream 漏洞风波

围绕这个事件,有大量关于开源项目安全问题和维护责任的讨论。

说到开源,六月份 微软收购 GitHub 算是一个爆炸新闻。

在过去的几个月里,微软为了成为 JavaScript 界主要参与者之一而做了大量工作,正如 TypeScript 语言和 VS Code 编辑器的成功所表明的。

因此,看到诸如微软这样的巨型企业控制了我们深爱的 GitHub,也许并不那么令人惊讶… 但在开源史上,这是多么大的一个转变啊!

感谢你们的关注,请随意分享这篇文章,或有任何意见反馈请到 GitHub 联系我们… 明年再见!

Chinese (simplified) version

Seognil LC
Seognil LC
略懂点 JavaScript,做过点翻译工作

Authors

Sacha Grief
Sacha Grief
Author of Discover Meteor and creator of Vulcan, a React+GraphQL open-source framework.

Available Translations

English

Español