feat: new now page
This commit is contained in:
parent
34e36473ee
commit
6b4d63ccad
5 changed files with 102 additions and 9 deletions
7
src/constants/bkup/2025-03-13.json
Normal file
7
src/constants/bkup/2025-03-13.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"title": "Started migrating some JS projects to TS",
|
||||
"description": "TypeScript is making some good moves recently",
|
||||
"publishDate": "2025-03-13",
|
||||
"publishedOn": "",
|
||||
"publishState": ""
|
||||
}
|
5
src/constants/bkup/2025-03-13.md
Normal file
5
src/constants/bkup/2025-03-13.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
Started some migrations of JS projects to TypeScript. There are a few moves from TypeScript & node that influenced me to do this:
|
||||
|
||||
1. [Node's type stripping](https://nodejs.org/api/typescript.html#type-stripping) - allows execution of TypeScript files that only contains erasable TypeScript syntax.
|
||||
2. [TypeScript's erasable syntax only](https://www.totaltypescript.com/erasable-syntax-only) - a flag to tell `tsc` to throw error on syntax that are not erasable (e.g., enums, namespaces, and class parameter properties)
|
||||
3. [TypeScript native compiler](https://devblogs.microsoft.com/typescript/typescript-native-port/) - promises 10x faster typescript compilation
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"title": "Started migrating some JS projects to TS",
|
||||
"description": "TypeScript is making some good moves recently",
|
||||
"publishDate": "2025-03-13",
|
||||
"publishedOn": "",
|
||||
"publishState": ""
|
||||
"title": "Building a tiny web ecosystem",
|
||||
"description": "I am focused at bringing my own web ecosystem to life",
|
||||
"publishDate": "2025-03-23",
|
||||
"publishedOn": "the 23rd of March, 2025 in my home in Amsterdam",
|
||||
"publishState": "where it is starting to get sunny again"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
Started some migrations of JS projects to TypeScript. There are a few moves from TypeScript & node that influenced me to do this:
|
||||
I have been building my own tiny web development ecosystem.
|
||||
|
||||
1. [Node's type stripping](https://nodejs.org/api/typescript.html#type-stripping) - allows execution of TypeScript files that only contains erasable TypeScript syntax.
|
||||
2. [TypeScript's erasable syntax only](https://www.totaltypescript.com/erasable-syntax-only) - a flag to tell `tsc` to throw error on syntax that are not erasable (e.g., enums, namespaces, and class parameter properties)
|
||||
3. [TypeScript native compiler](https://devblogs.microsoft.com/typescript/typescript-native-port/) - promises 10x faster typescript compilation
|
||||
My web "terrarium" -- at least, that's how I think of it.
|
||||
|
||||
I _now_ have:
|
||||
|
||||
1. [McFly](https://mcfly.js.org) - a metaframework for web components. I describe it that way because the web development industry is still largely in a "component" paradigm. I am hoping to support a different paradigm though, which I _still_ cannot put into words at the moment. So let's keep to thinking "web components" for now.
|
||||
2. [WCB](https://webcomponent.io) - a low-level reactivity system for... yeah, web components. There's a trade off between productivity & lightweight-ness here and it is somewhere between [Microsoft's FASTElement](https://github.com/microsoft/fast) & [Google's LitElement](https://github.com/lit/lit/). Though the other "knob" to balance the trade off, is building it generic so that devs can also use custom stuff, like now you can use [lit-html](https://codepen.io/ayoayco-the-styleful/pen/ZEwNJBR?editors=1010) with it.
|
||||
|
||||
Many things missing still, as is with all "terrariums", but building a model that represents the larger world allows me to understand web development in ways I never imagined I can.
|
||||
|
|
76
src/pages/now/and-then/posts/2025-03-13.astro
Normal file
76
src/pages/now/and-then/posts/2025-03-13.astro
Normal file
|
@ -0,0 +1,76 @@
|
|||
---
|
||||
import Layout from '../../../../layouts/Layout.astro'
|
||||
import Footer from '../../../../components/Footer.astro'
|
||||
|
||||
const title = `Started migrating some JS projects to TS`
|
||||
const description = `TypeScript is making some good moves recently`
|
||||
let publishedOn = ``
|
||||
const publishDate = `2025-03-13`
|
||||
const publishState = ``
|
||||
const content = `<p>Started some migrations of JS projects to TypeScript. There are a few moves from TypeScript & node that influenced me to do this:</p>
|
||||
<ol>
|
||||
<li><a href="https://nodejs.org/api/typescript.html#type-stripping">Node's type stripping</a> - allows execution of TypeScript files that only contains erasable TypeScript syntax.</li>
|
||||
<li><a href="https://www.totaltypescript.com/erasable-syntax-only">TypeScript's erasable syntax only</a> - a flag to tell <code>tsc</code> to throw error on syntax that are not erasable (e.g., enums, namespaces, and class parameter properties)</li>
|
||||
<li><a href="https://devblogs.microsoft.com/typescript/typescript-native-port/">TypeScript native compiler</a> - promises 10x faster typescript compilation</li>
|
||||
</ol>`
|
||||
|
||||
publishedOn = publishedOn === '' ? publishDate : publishedOn
|
||||
---
|
||||
|
||||
<Layout title={title} description={description}>
|
||||
<main>
|
||||
<h1><span class="text-gradient">{title}</span></h1>
|
||||
<p>
|
||||
<em>
|
||||
Published on
|
||||
<time datetime={publishDate}>{publishedOn}</time>
|
||||
{publishState}
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<Fragment set:html={content} />
|
||||
|
||||
<Footer />
|
||||
</main>
|
||||
</Layout>
|
||||
|
||||
<style>
|
||||
main {
|
||||
margin: auto;
|
||||
padding: 1em;
|
||||
max-width: var(--content-width);
|
||||
}
|
||||
|
||||
.text-gradient {
|
||||
font-weight: 900;
|
||||
background-image: var(--ayo-gradient);
|
||||
animation: pulse 4s ease-in-out infinite;
|
||||
background-size: 500% 500%;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-size: 100% 200%;
|
||||
background-position-y: 100%;
|
||||
border-radius: 0.4rem;
|
||||
}
|
||||
|
||||
.highlighted-content {
|
||||
margin: 1rem 0;
|
||||
background: #4f39fa;
|
||||
padding: 1rem;
|
||||
border-radius: 0.4rem;
|
||||
color: var(--color-bg);
|
||||
}
|
||||
|
||||
.highlighted-content code {
|
||||
font-size: var(--font-size-base);
|
||||
border: 0.1em solid var(--color-border);
|
||||
border-radius: 4px;
|
||||
padding: 0.15em 0.25em;
|
||||
}
|
||||
|
||||
.link-card-grid {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
Loading…
Reference in a new issue