-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
93 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Change Log | ||
|
||
# v1.0.0 (2022-02-22) | ||
|
||
### Features | ||
|
||
- **core:** Support React 17 [#90](https://github.com/airbnb/goji-js/pull/90) | ||
|
||
- **cli:** Upgrade to Webpack 5 [#22](https://github.com/airbnb/goji-js/pull/22) | ||
|
||
- **linaria:** Support Linaria 2 [#42](https://github.com/airbnb/goji-js/pull/42) | ||
|
||
- **testing-library:** Support Testing Library | ||
|
||
- **cli:** Support `nohoist` option to reduce main package bundle size | ||
[#120](https://github.com/airbnb/goji-js/pull/120) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: GojiJS v1.0 发布 | ||
author: Chong Ma | ||
authorURL: http://github.com/malash | ||
authorImageURL: https://avatars2.githubusercontent.com/u/1812118?s=460&v=4 | ||
--- | ||
|
||
GojiJS 是由 Airbnb(爱彼迎)开发的小程序前端框架,于 2020 年 06 月开源。经过了近一年半的迭代和测试各 | ||
项功能日趋稳定,因此决定发布 GojiJS v1.0 版本。 | ||
|
||
# 主要变化 | ||
|
||
GojiJS 提供了对最新前端生态的支持,包括: | ||
|
||
## 支持 React 17 框架 | ||
|
||
GojiJS 支持使用最新的 React 17 进行开发,GojiJS 推荐使用 | ||
[Hooks](https://reactjs.org/docs/hooks-intro.html) 和函数式组件开发。 | ||
|
||
> 暂不支持实验中的[concurrent mode](https://zh-hans.reactjs.org/docs/concurrent-mode-intro.html)。 | ||
## 使用基于 Webpack 5 的构建工具 | ||
|
||
GojiJS 的构建工具 `@goji/cli` | ||
[从 Webpack 4 升级到了 Webpack 5](https://github.com/airbnb/goji-js/pull/22),后者提供更好的兼容性和 | ||
性能。在大型项目中,开发模式下每次代码后的构建构建时间缩短了约 85%(数据来自 Airbnb 内部项目)。 | ||
|
||
## 使用 CSS-in-JS 开发 | ||
|
||
GojiJS 默认支持 Linaria 2,推荐使用 [CSS-in-JS 开发](https://goji.js.org/docs/en/css-in-js) 。这样可 | ||
以更好的组织代码,并且提供了更多的样式灵活性。同时因为 Linaria 是“零运行时”的,因此非常适合小程序的 | ||
开发场景。 | ||
|
||
## 编写单元测试 | ||
|
||
GojiJS 支持使用流行的 [Testing Library 编写单元测试](https://goji.js.org/docs/en/testing)。在大型项 | ||
目中,通过编写规范的单元测试可以有效的提升代码质量,提高代码可维护性。 | ||
|
||
## 优化打包体积 | ||
|
||
小程序中的“分包加载”是一种常见的打包体积优化方式,GojiJS 在此基础上做了更加极致的优化。新加入的 | ||
[`nohoist` 参数优化](http://goji.js.org/docs/en/sub-packages) 可以有效减少主包体积,避免因体积限制原 | ||
因导致无法发版。 | ||
|
||
# 升级方法 | ||
|
||
> 由于 v0.x 版本为不稳定版本,建议进行全新安装。 | ||
1. 推荐方法:参考[安装](https://goji.js.org/docs/en/setup)文档进行全新安装。 | ||
|
||
2. 手动方法:升级 `package.json` 中所有 `@goji/` 开头的包到 `^1.0.0` 版本,并重新运行 `npm` 或 | ||
`yarn` 命令。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters