Skip to content

Commit

Permalink
feat: add visual hint to local anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
topheman committed Oct 26, 2024
1 parent 7db5a79 commit 727f20c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
12 changes: 12 additions & 0 deletions custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
.sidebar .chapter-item {
padding-left: 10px;
}
.content main a[href^="."]::after,
.content main a[href^="#"]::after {
content: "⇲";
}
.content main h1 a[href^="#"]::after,
.content main h2 a[href^="#"]::after,
.content main h3 a[href^="#"]::after,
.content main h4 a[href^="#"]::after,
.content main h5 a[href^="#"]::after,
.content main h6 a[href^="#"]::after {
content: "";
}
8 changes: 4 additions & 4 deletions src/rolldown/explore-shared.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ npm run build-binding

### rolldown_common::file_emitter

The [`FileEmitter`](https://github.com/rolldown/rolldown/blob/main/crates/rolldown_common/src/file_emitter.rs) is instanciated and passed as an `Arc<FileEmitter>` to the [`rolldown_plugin::PluginDriver` (wiki)](#rolldown_pluginplugindriver)
The [`FileEmitter`](https://github.com/rolldown/rolldown/blob/main/crates/rolldown_common/src/file_emitter.rs) is instanciated and passed as an `Arc<FileEmitter>` to the [`rolldown_plugin::PluginDriver`](#rolldown_pluginplugindriver)

## rolldown_css

Expand Down Expand Up @@ -51,7 +51,7 @@ For the implementation, see [oxc-project/oxc-resolver](https://github.com/oxc-pr
- [`oxc_syntax::keyword::is_reserved_keyword_or_global_object`](https://github.com/oxc-project/oxc/blob/main/crates/oxc_syntax/src/keyword.rs)
- [`text_to_esm`](https://github.com/rolldown/rolldown/blob/main/crates/rolldown_loader_utils/src/text_to_esm.rs)
- [`binary_to_esm`](https://github.com/rolldown/rolldown/blob/main/crates/rolldown_loader_utils/src/binary_to_esm.rs)
- Based on the platform, it will be `__toBinary` or `__toBinaryNode`, the implementation is in [crates/rolldown/src/runtime](https://github.com/rolldown/rolldown/blob/main/crates/rolldown/src/runtime/index.js)
- Based on the platform, it will be `__toBinary` or `__toBinaryNode`, the implementation is in [`crates/rolldown/src/runtime`](https://github.com/rolldown/rolldown/blob/main/crates/rolldown/src/runtime/index.js)
- `import { __toBinary } from ./some-module; export default __toBinary(base64encoded)`

<a href="https://github.com/rolldown/rolldown/tree/main/crates/rolldown_loader_utils" title="Source Code of rolldown_loader_utils">📄</a>
Expand All @@ -75,7 +75,7 @@ For the implementation, see [oxc-project/oxc-resolver](https://github.com/oxc-pr
- instanciated by the [`BundlerBuilder`](https://github.com/rolldown/rolldown/blob/main/crates/rolldown/src/bundler_builder.rs)
- plugins: `Vec<SharedPluginable>` - list of plugins
- resolver: `&Arc<Resolver>` - see [`rolldown_resolver`](#rolldown_resolver)
- file_emitter: `SharedFileEmitter` - see [`rolldown_common::file_emitter` (source)](https://github.com/rolldown/rolldown/blob/main/crates/rolldown_common/src/file_emitter.rs) / [`rolldown_common::file_emitter` (wiki)](#rolldown_commonfile_emitter)
- file_emitter: `SharedFileEmitter` - see [`rolldown_common::file_emitter` (source)](https://github.com/rolldown/rolldown/blob/main/crates/rolldown_common/src/file_emitter.rs) / [`rolldown_common::file_emitter`](#rolldown_commonfile_emitter)
- options= `SharedNormalizedBundlerOptions = Arc<NormalizedBundlerOptions>`
- watch_files
- `PluginDriver::iter_plugin_with_context_by_order(self, [PluginIdx])` is available: it loops over plugins, **making their context available**
Expand Down Expand Up @@ -115,7 +115,7 @@ This is the plugin in charge of resolving the paths of the imports, which is a v

## rolldown_rstr

Exposes `rolldown_rstr::Rstr` which is a thin wrapper over [`oxc::span::CompactStr`](https://github.com/oxc-project/oxc/blob/main/crates/oxc_span/src/compact_str.rs), which is a wrapper over the [compact_str](https://crates.io/crates/compact_str) crate.
Exposes `rolldown_rstr::Rstr` which is a thin wrapper over [`oxc::span::CompactStr`](https://github.com/oxc-project/oxc/blob/main/crates/oxc_span/src/compact_str.rs), which is a wrapper over the [`compact_str`](https://crates.io/crates/compact_str) crate.

> A memory efficient string type that can store up to 24* bytes on the stack.
>
Expand Down
2 changes: 1 addition & 1 deletion src/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Some rust specifics
- [`std::sync::LazyLock`](https://doc.rust-lang.org/beta/std/sync/struct.LazyLock.html) - A value which is initialized on the first access.
- [`string_wizard::MagicString`](https://docs.rs/string_wizard/0.0.22/string_wizard/struct.MagicString.html) / [`magic-string`](https://github.com/Rich-Harris/magic-string)
- performant updates on large strings (like source-maps)
- [compact_str](https://crates.io/crates/compact_str) - check [rolldown_rstr](../rolldown/explore-shared.md#rolldown_rstr)
- [`compact_str`](https://crates.io/crates/compact_str) - check [`rolldown_rstr`](../rolldown/explore-shared.md#rolldown_rstr)

0 comments on commit 727f20c

Please sign in to comment.