Skip to content

Commit

Permalink
Post "two years"
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Oct 3, 2024
1 parent 4cb72d6 commit 69c021b
Show file tree
Hide file tree
Showing 12 changed files with 164 additions and 6 deletions.
Binary file not shown.
36 changes: 36 additions & 0 deletions packages/docs/src/components/EmojiBlastButton.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<style>
div {
display: none;
justify-content: center;
}

button {
color: var(--sl-color-text-accent);
margin-top: 2rem;
padding: 1rem;
background-color: var(--sl-color-orange);
border: 2px solid var(--sl-color-text-accent);
border-radius: 8px;
cursor: pointer;
font-size: 1.25rem;
}

button:hover {
background-color: var(--sl-color-bright-orange);
}
</style>

<div data-button-container>
<button>Hooray, release the clutter!</button>
</div>

<script type="module" id="emoji-blasts">
import { emojiBlast } from 'https://unpkg.com/[email protected]';
const container = document.querySelector('[data-button-container]');
const button = container.querySelector('button');
if(emojiBlast && button) {
const cb = () => emojiBlast({ emojis: ["✂️", "🚀", "❤️", "🎉", "🧡", "2️⃣"] });
container.style.display = 'flex';
button.addEventListener('click', cb);
};
</script>
2 changes: 1 addition & 1 deletion packages/docs/src/content/docs/blog/brief-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: A Brief History Of Knip
date: 2023-10-15
sidebar:
order: 4
order: 5
---

_Published: 2023-10-15_
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/content/docs/blog/knip-v3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Announcing Knip v3
date: 2023-10-15
sidebar:
order: 4
order: 6
---

import { Tabs, TabItem } from '@astrojs/starlight/components';
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/content/docs/blog/knip-v4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Announcing Knip v4
date: 2024-01-16
sidebar:
order: 2
order: 3
---

import { Tabs, TabItem } from '@astrojs/starlight/components';
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/content/docs/blog/knip-v5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Announcing Knip v5
date: 2024-02-10
sidebar:
order: 1
order: 2
---

import { Tabs, TabItem } from '@astrojs/starlight/components';
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/content/docs/blog/release-notes-v2.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Release Notes v2
sidebar:
order: 6
order: 7
---

_2023-03-22_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Slim down to speed up
date: 2023-12-14
sidebar:
order: 3
order: 4
---

_Published: 2023-12-14_
Expand Down
106 changes: 106 additions & 0 deletions packages/docs/src/content/docs/blog/two-years.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
title: Two Years
date: 2024-10-04
sidebar:
order: 1
---

_Published: 2024-10-04_

import EmojiBlastButton from '../../../components/EmojiBlastButton.astro';
import Projects from '../../../components/Projects.astro';
import Sponsors from '../../../components/Sponsors.astro';

Exactly two years ago the first commit was pushed to GitHub and the first
version of Knip was published to the npm registry. The name was initially
[Exportman][1]! We've come a loooong way... The JavaScript ecosystem is highly
dynamic and I've been crazy enough to even start, try and keep up with it! But
here we are.

October 4th is World Animal Day, so there was really no choice but bring in the
crazy mascot that early adopters may remember:

![Crazy cow with orange scissors in Van Gogh style][2]

Today we celebrate an unknown but CRAZY amount of clutter removed from so many
codebases with Knip's help. Every single day I see many of those little red
blocks for thousands of lines of deleted code and dependencies. Call me crazy,
but to me this is pure joy and never gets old!    🟩 🟥 🟥 🟥 🟥

<EmojiBlastButton />

## Smiling faces

The actual amount of code and dependencies removed and the number of smiling
faces this brings is what matters most, but also remain a good mystery. Clearly
more and more projects add Knip to their projects and CI workflows to keep
ever-growing codebases tidy. It's wonderful to see if Knip plays its part in
today's ecosystem to help with that. Thanks for bearing with me, here's to a lot
more little red blocks in your PRs!    🟩 🟥 🟥 🟥 🟥

## Updates

Why not throw in some freshly cooked updates in [v5.31.0][3] for you while we're
at it:

- [The auto-fix feature][4] has been completely revamped, it's much better and a
lot more comprehensive! You have to see it to believe it.
- Knip has upgraded to [Jiti v2][5], resolving a bunch of known issues when
loading configuration files authored in TypeScript and ESM, such as:

```
Cannot use 'import.meta' outside a module
await is only valid in async functions and the top level bodies of modules
Unexpected identifier 'Promise'
Reflect.metadata is not a function
```

And that pesky "CJS build of Vite's Node API is deprecated" warning is finally
gone!

Thanks to everyone involved in making this happen, it's truly much appreciated.

## Stable

If you haven't tried Knip recently, it's worth taking another look! Version 5
was released 8 months ago, and even though there were no breaking changes, it
includes many enhancements. In fact, Knip has been largely stable since version
3, which came out a year ago. Many releases have a compound effect, as Knip has
kept the pace for two years now.

## Projects using Knip

This list of projects using Knip to keep their codebases tidy is something I
couldn't be more proud of:

:::section{.columns.min200}

<Projects />

:::

And so many more on and off the radar. Very, very cool!

## Sponsors

Last but not least, eternal gratitude for all the sponsors that have been
supporting me along the way. THANK YOU, THANK YOU, THANK YOU!

And eh.. gotta take my chances: how about [joining this awesome club][6]?

:::section{.columns.min300.mt}

<Sponsors />

:::

## Acknowledgements

Thanks to Joshua Goldberg for [emoji-blast](https://www.emojiblast.dev)! 🎉

[1]: https://www.npmjs.com/package/exportman/v/0.0.1
[2]: /cow-with-orange-scissors-van-gogh-style.webp
[3]: https://github.com/webpro-nl/knip/releases/tag/5.31.0
[4]: ../features/auto-fix.md
[5]: https://github.com/unjs/jiti
[6]: /sponsors
4 changes: 4 additions & 0 deletions packages/docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ hero:
link: ./overview/getting-started
icon: right-arrow
variant: primary
# - text: 'NEW! Two Years'
# link: /blog/two-years
# icon: star
# variant: secondary
- text: View on GitHub
link: https://github.com/webpro-nl/knip
icon: external
Expand Down
8 changes: 8 additions & 0 deletions packages/docs/src/styles/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ html {
border-inline-start-color: var(--sl-color-gray-1);
}

.sl-markdown-content section.columns.mt {
margin-top: 3rem;
}

section.columns ul {
padding: 0;
list-style: none;
Expand Down Expand Up @@ -129,6 +133,10 @@ section.plugins li {
margin-top: 2rem;
}

.sl-markdown-content p > img {
margin: 2rem 0;
}

:root[data-theme='light'] {
.logo-border {
border-color: var(--sl-color-black);
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/src/styles/hero.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
background-color: var(--sl-color-bright-orange);
}

.actions .sl-link-button.secondary:hover {
background-color: var(--sl-color-orange);
}

:root {
.actions .sl-link-button.primary {
color: var(--sl-color-white);
Expand Down

0 comments on commit 69c021b

Please sign in to comment.