Skip to content

Commit 1a7da5a

Browse files
authored
Fix typos in ARCHITECTURE.md (#5530)
1 parent 38114c4 commit 1a7da5a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ARCHITECTURE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- The [`rollup`](https://www.npmjs.com/package/rollup) npm package contains both Rollup's Node.js JavaScript interface and the command-line-interface (CLI).
66
- There is a separate browser build available as [`@rollup/browser`](https://www.npmjs.com/package/@rollup/browser). It exposes the same JavaScript interface as the Node.js build but does not include the CLI and also requires writing a plugin to encapsulate file reading. Instead of native code dependencies, this build has a bundled WASM artifact included that can be loaded in the browser. This is what the [Rollup REPL](https://rollupjs.org/repl) uses.
7-
- For every supported platform-architecture combination, there is a separate pacakge containing the native code. These are not listed in the committed `package.json` file but are added dynamically during publishing as `optionalDependencies`. The `README.md` and `package.json` files for those dependencies can be found in the [`npm`](npm) folder. The corresponding binaries are built and published from [GitHub Actions](.github/workflows/build-and-tests.yml) whenever a new release version tag is pushed. The actual loading of the native code is handled by [`native.js`](native.js) which is copied into the output folder during build. So to add a new platform-architecture combination, you need to
7+
- For every supported platform-architecture combination, there is a separate package containing the native code. These are not listed in the committed `package.json` file but are added dynamically during publishing as `optionalDependencies`. The `README.md` and `package.json` files for those dependencies can be found in the [`npm`](npm) folder. The corresponding binaries are built and published from [GitHub Actions](.github/workflows/build-and-tests.yml) whenever a new release version tag is pushed. The actual loading of the native code is handled by [`native.js`](native.js) which is copied into the output folder during build. So to add a new platform-architecture combination, you need to
88
- add a new package in the `npm` folder
99
- update the `native.js` file
1010
- add the corresponding triple to the [`package.json`](package.json) file as napi-rs depends on this
@@ -24,7 +24,7 @@
2424
- The entry point for the Node.js build is [`node-entry.ts`](src/node-entry.ts) while the browser build uses [`browser-entry.ts`](src/browser-entry.ts). Those are mostly identical except that the browser build does not expose the watch mode interface.
2525
- The CLI is a wrapper around the JavaScript interface.
2626
- It resides in the [`cli` folder](cli) with the entry point [cli.ts](cli/cli.ts).
27-
- The logic to read configuration files resides in [locaConfigFile.ts](cli/run/loadConfigFile.ts) and is exposed as a separate export via `import { loadConfigFile } from "rollup/loadConfigFile"`.
27+
- The logic to read configuration files resides in [loadConfigFile.ts](cli/run/loadConfigFile.ts) and is exposed as a separate export via `import { loadConfigFile } from "rollup/loadConfigFile"`.
2828
- Only the CLI is able to handle arrays of configurations. Those are handled sequentially in [`run/index.ts`](cli/run/index.ts).
2929
- The CLI handles several CLI-only options that are specific to the Node.js environment like setting environment variables or handling std-in, see [Command line flags](docs/command-line-interface/index.md#command-line-flags).
3030

@@ -42,7 +42,7 @@ The Rust entrypoints are [`bindings_napi/src/lib.rs`](rust/bindings_napi/src/lib
4242

4343
Building an output has two phases
4444

45-
- The "build" phase builds a module graph form the input files and decides, which code should be included in the output
45+
- The "build" phase builds a module graph from the input files and decides, which code should be included in the output
4646
- It is triggered by calling the `rollup(inputOptions)` function exported by the JavaScript interface
4747
- It returns a "bundle" object that has `generate` and `write` methods
4848
- The "generate" phase generates the output files from the bundle by calling `.generate(outputOptions)` or `.write(outputOptions)`
@@ -96,14 +96,14 @@ To understand this phase from a plugin perspective, have a look at [Build Hooks]
9696

9797
To understand this phase from a plugin perspective, have a look at [Output Generation Hooks](https://rollupjs.org/plugin-development/#output-generation-hooks), which again contains a graph to show in which order these hooks are executed. In detail `Bundle.generate` performs the following steps
9898

99-
- Assign modules to chunks via [`chunkAssigment.ts`](src/utils/chunkAssignment.ts)
99+
- Assign modules to chunks via [`chunkAssignment.ts`](src/utils/chunkAssignment.ts)
100100
- Determine the exports for each chunk by tracing the included inter-module dependencies
101101
- Render the chunks, which is orchestrated by the [`renderChunks`](src/utils/renderChunks.ts) helper
102102
- Render the chunks with placeholders for chunk hashes by calling `Chunk.render()`
103103
- Determine how dynamic imports and `import.meta` references should be resolved and store this on the corresponding AST nodes.
104104
- Determine the final deconflicted variable names and store those on the AST nodes as well in [`deconflictChunk.ts`](src/utils/deconflictChunk.ts)
105105
- Render each module by calling the `.render` methods of their AST nodes. This is also where tree-shaken nodes are removed from the output.
106-
- Render the format specific wrapper with imports and exports for this chunk by calling the corresponding [finalizer](src/finalisers).
106+
- Render the format specific wrapper with imports and exports for this chunk by calling the corresponding [finaliser](src/finalisers).
107107
- Transform the rendered chunks via the [`renderChunk`](https://rollupjs.org/plugin-development/#renderchunk) plugin hook
108108
- Determine the final chunk hashes based on the actual rendered content and the chunk dependency graph and replace the placeholders
109109

0 commit comments

Comments
 (0)