Skip to content

Commit

Permalink
docs(en): merging all conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
docschina-bot committed Jul 27, 2024
2 parents 96ba23c + 8b96791 commit 6151448
Show file tree
Hide file tree
Showing 27 changed files with 741 additions and 535 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# rollup changelog

## 4.19.1

_2024-07-27_

### Bug Fixes

- Do not remove parantheses when tree-shaking logical expressions (#5584)
- Do not ignore side effects in calls left of an optional chaining operator (#5589)

### Pull Requests

- [#5584](https://github.com/rollup/rollup/pull/5584): fix: find whitespace from operator position to start (@TrickyPi)
- [#5587](https://github.com/rollup/rollup/pull/5587): docs: improve command by code-group (@thinkasany, @lukastaegert)
- [#5589](https://github.com/rollup/rollup/pull/5589): Fix side effect detection in optional chains (@lukastaegert)
- [#5592](https://github.com/rollup/rollup/pull/5592): chore(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5593](https://github.com/rollup/rollup/pull/5593): chore(deps): lock file maintenance minor/patch updates (@renovate[bot])
- [#5594](https://github.com/rollup/rollup/pull/5594): chore(deps): lock file maintenance (@renovate[bot])
- [#5595](https://github.com/rollup/rollup/pull/5595): chore(deps): lock file maintenance (@renovate[bot])

## 4.19.0

_2024-07-20_
Expand Down
2 changes: 1 addition & 1 deletion browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rollup/browser",
"version": "4.19.0",
"version": "4.19.1",
"description": "Next-generation ES module bundler browser build",
"main": "dist/rollup.browser.js",
"module": "dist/es/rollup.browser.js",
Expand Down
23 changes: 23 additions & 0 deletions docs/introduction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ npm install --global rollup
这些命令假定你的应用程序入口点命名为 `main.js`,并且希望将所有导入编译到一个名为 `bundle.js` 的单个文件中。

<<<<<<< HEAD
对于浏览器:

```shell
Expand All @@ -48,6 +49,28 @@ rollup main.js --file bundle.js --format umd --name "myBundle"
```

## 背景 {#the-why}
=======
::: code-group

```shell [For browsers:]
# compile to a <script> containing a self-executing function ('iife')
$ rollup main.js --file bundle.js --format iife
```

```shell [For Node.js:]
# compile to a CommonJS module ('cjs')
$ rollup main.js --file bundle.js --format cjs
```

```shell [For both browsers and Node.js:]
# UMD format requires a bundle name
$ rollup main.js --file bundle.js --format umd --name "myBundle"
```

:::

## The Why
>>>>>>> 8b967917c2923dc6a02ca1238261387aefa2cb2f
将项目分解为较小的独立部分通常可以使软件开发更加容易,因为这通常可以消除意外的交互,并大大减少你需要解决的问题的复杂性,而仅仅是首先编写较小的项目 [并不一定是最好的方式](https://medium.com/@Rich_Harris/small-modules-it-s-not-quite-that-simple-3ca532d65de4)。不幸的是,JavaScript 在历史上并没有将这种能力作为语言的核心特性之一。这在 ES6 版本的 JavaScript 中得到了改变,该版本包括一种语法,用于导入和导出函数和数据,以便它们可以在单独的脚本之间共享。

Expand Down
Loading

0 comments on commit 6151448

Please sign in to comment.