Skip to content

Commit ba5dbbc

Browse files
authored
Couple of documentation tweaks (#194)
1 parent 06e9560 commit ba5dbbc

8 files changed

Lines changed: 115 additions & 85 deletions

File tree

documentation/src/components/CatShader.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ export function CatShader() {
230230
return () => {};
231231

232232
const shader = new ShaderController(canvas, gl);
233+
shader.render();
233234

234235
let renderLoop: ReturnType<typeof requestAnimationFrame>;
235236

documentation/src/components/cat-shader/fragment.glsl

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ vec2 fbm(vec2 p) {
4444
float amplitude = 0.5;
4545
float frequency = 1.0;
4646

47-
for (int i = 0; i < 5; i++) {
47+
for (int i = 0; i < 3; i++) {
4848
value += amplitude * noise(p * frequency - time * 0.5);
4949
amplitude *= 0.5;
5050
frequency *= 2.0;
@@ -76,7 +76,7 @@ float kset(vec2 p2) {
7676
//pp+=.5;
7777
pp.y+=.3;
7878
pp = abs(.5-fract(pp));
79-
for (int i=0; i<9; i++) {
79+
for (int i=0; i<7; i++) {
8080
pp = abs(pp)/max(dot(pp,pp),0.003)-.91;
8181
};
8282
c+=pow(length(pp),1.3)*.35;
@@ -108,6 +108,7 @@ void main() {
108108
vec2 scaledUv = v_texCoord;
109109
scaledUv = scaledUv - 0.5;
110110
scaledUv.x *= resolution.x / resolution.y;
111+
scaledUv /= 1.2;
111112

112113
vec2 pxUv = v_texCoord;
113114
pxUv *= resolution;
@@ -116,8 +117,8 @@ void main() {
116117
uv.x *= textureSize.y / textureSize.x;
117118

118119
// Make the cat larger and slightly to the right
119-
uv.x -= 0.3;
120-
uv.y += 0.15;
120+
// uv.x -= 0.3;
121+
// uv.y += 0.15;
121122

122123
vec2 p = uv;
123124
uv = uv + 0.5;
@@ -129,7 +130,7 @@ void main() {
129130
float f = fbm((uv-.5)*30.).x*0.2*exp(-sdf);
130131
vec3 col = smoothstep(y*.3+.1,.4,sdf-f) * color1 * .7;
131132
col = pow(max(0.,sdf*2.2-f*fbmsubstract),falloff) * color1 * .8;
132-
float k = ksetaa(p+.5);
133+
float k = kset(p+.5);
133134
sdf = pow(sdf,.4+y*1.5);
134135
col=clamp(col,0.,1.);
135136
col+=k*.3*smoothstep(0.,.7,sdf)*color1+pow(k*.2,2.5)*pow(sdf,2.)*2.;
@@ -141,13 +142,13 @@ void main() {
141142
col+=star(4.,(p+vec2(.1,.23))*1.8);
142143
col+=star(5.,(p+vec2(.0,.3))*4.);
143144
col+=star(6.,(p+vec2(-.15,.3))*3.);
144-
col+=star(7.,(p+vec2(-.25,.33))*3.);
145+
// col+=star(7.,(p+vec2(-.25,.33))*3.);
145146
col+=star(8.,(p+vec2(.3,.0))*2.);
146147
col+=star(9.,(p+vec2(.25,-.13))*3.5);
147-
col+=star(10.,(p+vec2(-.25,-.1))*3.5);
148-
col+=star(11.,(p+vec2(-.27,-.3))*3.5);
149-
col+=star(12.,(p+vec2(-.3,-.05))*5.);
150-
col+=star(13.,(p+vec2(-.27,.1))*4.);
148+
// col+=star(10.,(p+vec2(-.25,-.1))*3.5);
149+
// col+=star(11.,(p+vec2(-.27,-.3))*3.5);
150+
// col+=star(12.,(p+vec2(-.3,-.05))*5.);
151+
// col+=star(13.,(p+vec2(-.27,.1))*4.);
151152

152153
float lum = dot(col, vec3(0.2126, 0.7152, 0.0722));
153154
fragColor = vec4(col, lum);

documentation/src/content/blog/2026-01-19-evolving-yarn.mdx

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -16,54 +16,56 @@ Almost ten years after the first public release of Yarn, now is a great time to
1616

1717
Keep in mind that while performances are a significant part of why we did this rewrite, we first focused on the compatibility aspect. Many low hanging fruits remain, and we’re excited to work with the JavaScript / Rust tooling community to increase the difference even further.
1818

19-
<table class="table-fixed [&_th,&_td]:min-w-auto">
20-
<colgroup>
21-
<col style="width: calc(100% - 600px)"/>
22-
<col style="width: 200px"/>
23-
<col style="width: 200px"/>
24-
<col style="width: 200px"/>
25-
</colgroup>
26-
<thead>
27-
<tr>
28-
<th>Test</th>
29-
<th>Before</th>
30-
<th>After</th>
31-
<th>Pnpm</th>
32-
</tr>
33-
</thead>
34-
<tbody>
35-
<tr>
36-
<th colspan="4">Next.js - few but heavy dependencies</th>
37-
</tr>
38-
<tr>
39-
<td>Cold cache</td>
40-
<td>4.1s</td>
41-
<td>2.5s</td>
42-
<td>3.0s</td>
43-
</tr>
44-
<tr>
45-
<td>Warm cache</td>
46-
<td>577ms</td>
47-
<td>184ms</td>
48-
<td>686ms</td>
49-
</tr>
50-
<tr>
51-
<th colspan="4">Gatsby - lots of small dependencies</th>
52-
</tr>
53-
<tr>
54-
<td>Cold cache</td>
55-
<td>19.8s</td>
56-
<td>11.7s</td>
57-
<td>13.1s</td>
58-
</tr>
59-
<tr>
60-
<td>Warm cache</td>
61-
<td>1.7s</td>
62-
<td>0.3s</td>
63-
<td>1.9s</td>
64-
</tr>
65-
</tbody>
66-
</table>
19+
<div class="w-full overflow-auto">
20+
<table class="table-fixed [&_th,&_td]:min-w-auto">
21+
<colgroup>
22+
<col style="width: calc(100% - 600px); min-width: 200px"/>
23+
<col style="width: 200px"/>
24+
<col style="width: 200px"/>
25+
<col style="width: 200px"/>
26+
</colgroup>
27+
<thead>
28+
<tr>
29+
<th>Test</th>
30+
<th>Before</th>
31+
<th>After</th>
32+
<th>Pnpm</th>
33+
</tr>
34+
</thead>
35+
<tbody>
36+
<tr>
37+
<th colspan="4">Next.js - few but heavy dependencies</th>
38+
</tr>
39+
<tr>
40+
<td>Cold cache</td>
41+
<td>4.1s</td>
42+
<td>2.5s</td>
43+
<td>3.0s</td>
44+
</tr>
45+
<tr>
46+
<td>Warm cache</td>
47+
<td>577ms</td>
48+
<td>184ms</td>
49+
<td>686ms</td>
50+
</tr>
51+
<tr>
52+
<th colspan="4">Gatsby - lots of small dependencies</th>
53+
</tr>
54+
<tr>
55+
<td>Cold cache</td>
56+
<td>19.8s</td>
57+
<td>11.7s</td>
58+
<td>13.1s</td>
59+
</tr>
60+
<tr>
61+
<td>Warm cache</td>
62+
<td>1.7s</td>
63+
<td>0.3s</td>
64+
<td>1.9s</td>
65+
</tr>
66+
</tbody>
67+
</table>
68+
</div>
6769

6870
*(more benchmarks are available here; we’re also setting up a new benchmark on massive megarepos, but those don’t run on other package managers yet)*
6971

@@ -104,6 +106,6 @@ Yarn 6.x is still months away, and important features remain to tackle:
104106
- Windows support
105107
- Interactive commands
106108
- Collaboration with third-party tools parsing the lockfile manually
107-
-
109+
- Wrapping up the last standing failing tests
108110

109-
The work is ongoing, and we’re eager to engage with the community to release a tool that we think will redefine once more what JavaScript developers come to expect from their package managers.
111+
This work is ongoing, and we’re eager to engage with the community to release a tool that we think will redefine once more what JavaScript developers come to expect from their package managers.

documentation/src/content/docs/getting-started/basics/install.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ curl -sS https://repo.yarnpkg.com/install | bash
1313
```
1414

1515
:::caution
16-
You will likely have to restart your terminal session for the changes to take effect.
16+
You will likely have to restart your terminal sessions, **IDEs included**, for the changes to take effect.
1717
:::
1818

1919
Once Yarn Switch is ready, just initialize a new project:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
category: getting-started
3+
slug: getting-started/github-actions
4+
title: GitHub Actions
5+
description: Useful tools and settings when operating within GitHub Action environments.
6+
---
7+
8+
Yarn provides a [`yarnpkg/setup-action`](https://github.com/yarnpkg/setup-action) action you can use in your CI workflows:
9+
10+
```yaml
11+
name: JavaScript
12+
13+
on:
14+
push:
15+
16+
jobs:
17+
typecheck:
18+
name: Typecheck
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
22+
23+
- name: Setup Yarn
24+
uses: yarnpkg/setup-action@c9778d0717d1b46cf29f06ae5ae5ad41c1bb1c1a
25+
26+
- name: Running TypeScript
27+
run: |
28+
yarn tsc
29+
```

documentation/src/pages/blog/[...slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const { data: author } = await getEntry(entry.data.author);
7777
</div>
7878
</div>
7979

80-
<div class="pt-8 pb-6">
80+
<div class="pt-8 pb-12">
8181
{
8282
author !== undefined && (
8383
<div class="flex items-center gap-x-4">

documentation/src/pages/blog/index.astro

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,15 @@ renderedEntries.sort((a, b) => b.rawDate.valueOf() - a.rawDate.valueOf());
4242
hideBackground: true,
4343
}}
4444
>
45-
<div class="container pt-20">
45+
<div class="container pt-8">
4646
<div class="flex flex-col items-center text-center pb-16">
47-
<div class="pb-3 lg:pb-4">
48-
<Headline> Blog </Headline>
49-
</div>
5047
<Heading size="h2">Find out the news</Heading>
5148
</div>
5249

53-
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
50+
<div class="flex flex-col gap-12">
5451
{
5552
renderedEntries.map(({ entry, date, minutesRead, author, Content }) => (
56-
<div class="bg-gradient-to-b from-white/15 to-white/5 p-px rounded-[20px]">
53+
<div class="mx-auto max-w-[700px] bg-gradient-to-b from-white/15 to-white/5 p-px rounded-[20px]">
5754
<div class="rounded-[20px] p-4 md:p-6 bg-gradient-to-b from-gray-950 to-gray-800 h-full flex flex-col justify-between">
5855
<a href={`/blog/${entry.data.slug}`}>
5956
<Heading className="pb-2 md:pb-3">{entry.data.title}</Heading>

documentation/src/sections/Hero.astro

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,42 @@ import cat from "@/assets/image/logo-cat-nobg.png";
1212
import heroEllipse from "@/assets/svg/hero-ellipse.svg";
1313
---
1414

15-
<div class="absolute inset-0 overflow-hidden -z-40">
16-
<div class="mt-20 lg:mt-0 w-full aspect-square">
17-
<CatShader client:load/>
18-
</div>
19-
</div>
20-
2115
<div class="-mt-28 lg:-mt-33">
22-
<section class="relative">
23-
<div class="px-4 container flex flex-col items-start h-[100vh] lg:justify-around">
24-
<div class="flex-none mt-0 h-33"/>
16+
<section class="relative text-center lg:text-left">
17+
<div class="px-4 pb-8 container flex flex-col min-h-[100vh] items-center lg:items-start lg:justify-around">
18+
<div class="flex-none mt-0 h-28 lg:h-25"/>
2519

26-
<div class="flex flex-col items-start mt-auto mb-0 lg:mb-auto">
20+
<div class="flex flex-col items-start lg:mt-auto mb-0 lg:mb-auto">
2721
<Heading size="h1" className="max-w-3xl">
2822
Safe, stable, <br /> reproducible projects
2923
</Heading>
3024

3125
<p class="text-white! pt-6 max-w-2xl text-sm md:text-base">
32-
Yarn is a package manager that doubles down as project manager. Whether
33-
you work on simple projects or industry monorepos, Yarn got it covered.
26+
Yarn is a package manager that doubles down as project manager.
27+
Simple projects or large scale monorepos, Yarn got you covered.
3428
</p>
3529

36-
<div class="pt-6 lg:pt-8">
30+
<div class="flex flex-col items-center lg:items-start mx-auto lg:mx-0 my-6 lg:mb-0 space-y-4">
3731
<Headline>
3832
<span class="font-mono">
3933
curl repo.yarnpkg.com/install | bash
4034
</span>
4135
</Headline>
42-
</div>
43-
<div class="pt-4">
44-
<Versions client:load/>
36+
<div>
37+
<Versions client:load/>
38+
</div>
4539
</div>
4640
</div>
4741

48-
<div class="mt-8 -mx-2 mb-8 max-w-2xl w-full">
42+
<div class="w-full lg:max-w-[650px]">
4943
<SearchPackageInterface client:only="preact" />
5044
</div>
45+
46+
<div class="lg:absolute lg:top-0 lg:right-0 lg:h-screen lg:pt-33 -z-40">
47+
<div class="lg:h-full aspect-square">
48+
<CatShader client:load/>
49+
</div>
50+
</div>
5151
</div>
5252
</section>
5353
</div>

0 commit comments

Comments
 (0)