Skip to content

Commit

Permalink
docs: major improvements (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber authored Jul 21, 2024
1 parent 6dde41c commit 6701aa4
Show file tree
Hide file tree
Showing 62 changed files with 1,583 additions and 553 deletions.
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,10 @@ TypeScript Execute (tsx): The easiest way to run TypeScript in Node.js

<p align="center">
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=398771"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/donate.webp"></a>
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=397608"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/sponsor.webp"></a>
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=416984"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/sponsor.webp"></a>
</p>
<p align="center"><sup><i>Already a sponsor?</i> Join the discussion in the <a href="https://github.com/pvtnbr/tsx">Development repo</a>!</sup></p>

> [!TIP]
> **Build your TypeScript projects?**
>
> Try [<img width="20" valign="middle" src="https://raw.githubusercontent.com/privatenumber/pkgroll/master/.github/logo.webp"> pkgroll](https://github.com/privatenumber/pkgroll)—the zero-config package bundler used by _tsx_!
>
> _pkgroll_ is a thin Rollup wrapper that makes it so simple for your package to support CommonJS, ESM, & TypeScript.
>
> If you love tsx, you'll love pkgroll too!

## Sponsors

<p align="center">
Expand Down
262 changes: 185 additions & 77 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { defineConfig } from 'vitepress';

const title = 'tsx';
const description = 'tsx (TypeScript Execute) - The easiest way to run TypeScript in Node.js';

export default defineConfig({
lang: 'en-US',

title: 'tsx',
title,

description: 'tsx (TypeScript Execute) - The easiest way to run TypeScript in Node.js',
description,

lastUpdated: true,

Expand All @@ -16,22 +19,48 @@ export default defineConfig({
metaChunk: true,

head: [
[
'link',
{
rel: 'icon',
type: 'image/svg+xml',
href: '/favicon.svg',
},
],
[
'script',
{
src: 'https://beamanalytics.b-cdn.net/beam.min.js',
'data-token': 'ee893e1d-7484-4fb3-85b7-78c58b3d9c9e',
async: '',
},
],
['link', {
rel: 'icon',
type: 'image/svg+xml',
href: '/logo-mini.svg',
}],
['meta', {
property: 'og:title',
content: title,
}],
['meta', {
property: 'og:type',
content: 'website',
}],
['meta', {
property: 'og:image',
content: 'https://tsx.is/social.png',
}],
['meta', {
property: 'og:url',
content: 'https://tsx.is',
}],
['meta', {
property: 'og:description',
content: description,
}],
['meta', {
property: 'og:site_name',
content: title,
}],
['meta', {
name: 'twitter:card',
content: 'summary_large_image',
}],
['meta', {
name: 'twitter:site',
content: '@tsx_is',
}],
['script', {
src: 'https://beamanalytics.b-cdn.net/beam.min.js',
'data-token': 'ee893e1d-7484-4fb3-85b7-78c58b3d9c9e',
async: '',
}],
],

themeConfig: {
Expand All @@ -43,81 +72,160 @@ export default defineConfig({
alt: 'tsx',
},

outline: 'deep',

editLink: {
pattern: 'https://github.com/privatenumber/tsx/edit/master/docs/:path',
text: 'Edit this page on GitHub',
text: 'Propose changes to this page',
},

nav: [
{ text: 'Discussions', link: 'https://github.com/privatenumber/tsx/discussions' },
],

sidebar: [
{
text: 'Introduction',
items: [
{ text: 'What is tsx?', link: '/' },
{ text: 'Getting Started', link: '/getting-started' },
],
text: 'User guide',
link: '/',
activeMatch: '^(?!\/dev-api\/).*',
},
{
text: 'Usage',
items: [
{ text: 'Basic usage', link: '/usage' },
{ text: 'Watch mode', link: '/watch-mode' },
{ text: 'Scripts', link: '/scripts' },
]
},
{
text: 'Node.js API',
base: '/node',
items: [
{
text: 'Global enhancement',
link: '/',
items: [
{
text: 'CommonJS only',
link: '/cjs'
},
{
text: 'Module only',
link: '/esm'
},
],
},
{
text: 'Isolated methods',
items: [
{
text: 'tsImport()',
link: '/ts-import'
},
{
text: 'tsx.require()',
link: '/tsx-require'
},
],
},
],
},
{
text: 'Integration',
items: [
{ text: 'VSCode', link: '/vscode' },
]
},
{
text: 'FAQ',
link: '/faq',
text: 'Developer API',
link: '/dev-api/',
activeMatch: '/dev-api/',
},
],

sidebar: {
'/': [
{
text: 'Introduction',
items: [
{
text: 'About tsx',
link: '/',
},
{
text: 'Getting started',
link: '/getting-started',
},
],
},
{
text: 'Usage',
items: [
{
text: 'Node.js enhancement',
link: '/node-enhancement',
},
{
text: 'Watch mode',
link: '/watch-mode',
},
],
},
{
text: 'Integration',
items: [
{
text: 'TypeScript',
link: '/typescript',
},
{
text: 'Compilation',
link: '/compilation',
},
{
text: 'Shell scripts',
link: '/shell-scripts',
},
{
text: 'VSCode debugging',
link: '/vscode',
},
]
},
{
text: 'Support',
items: [
{
text: 'FAQ',
link: '/faq',
docFooterText: 'Frequently Asked Questions',
},
{
text: 'Learning resources',
link: '/learn',
},
{
text: 'Forum (Sponsors only)',
link: 'https://github.com/pvtnbr/tsx/discussions',
},
{
text: 'Become a Sponsor',
link: 'https://github.com/sponsors/privatenumber/sponsorships?tier_id=416984',
},
],
},
],
'/dev-api/': [
{
text: 'About the Developer API',
link: '/dev-api/',
},
{
text: 'Automatic registration',
items: [
{
text: 'Node.js CLI',
link: '/dev-api/node-cli'
},
{
text: 'Entry-point',
link: '/dev-api/entry-point'
},
],
},
{
text: 'Scoped TS loading',
items: [
{
text: 'tsImport()',
link: '/dev-api/ts-import'
},
{
text: 'tsx.require()',
link: '/dev-api/tsx-require'
},
],
},
{
text: 'Register API',
items: [
{
text: 'CommonJS',
link: '/dev-api/register-cjs'
},
{
text: 'ESM',
link: '/dev-api/register-esm'
},
],
},
],
},

socialLinks: [
{
icon: 'github',
link: 'https://github.com/privatenumber/tsx',
},
{
icon: 'x',
link: 'https://x.com/tsx_is',
},
{
icon: {
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="#888888" d="M1.946 9.315c-.522-.174-.527-.455.01-.634L21.044 2.32c.529-.176.832.12.684.638l-5.454 19.086c-.15.529-.455.547-.679.045L12 14l6-8l-8 6z"/></svg>'
},
link: '/contact'
}
],

search: {
Expand Down
Loading

0 comments on commit 6701aa4

Please sign in to comment.