Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions docs/.config/docs.yaml

This file was deleted.

23 changes: 21 additions & 2 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
node_modules
.nuxt
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example
5 changes: 5 additions & 0 deletions docs/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"nuxt.mdc"
]
}
65 changes: 65 additions & 0 deletions docs/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
export default defineAppConfig({
shadcnDocs: {
site: {
name: 'magic-regexp',
description: 'Beautifully designed Nuxt Content template built with shadcn-vue. Customizable. Compatible. Open Source.',
ogImageComponent: 'ShadcnDocs',
ogImageColor: 'dark',
},
theme: {
customizable: false,
color: '',
radius: 0.5,
},
header: {
title: 'magic-regexp',
showTitle: true,
darkModeToggle: true,
logo: {
light: '/logo.svg',
dark: '/logo.svg',
},
nav: [],
links: [{
icon: 'lucide:github',
to: 'https://github.com/unjs/magic-regexp',
target: '_blank',
}],
},
aside: {
useLevel: true,
collapse: false,
},
main: {
breadCrumb: true,
showTitle: true,
},
footer: {
credits: 'Made with ❤️. Copyright © 2025 Daniel Roe',
links: [{
icon: 'lucide:github',
to: 'https://github.com/unjs/magic-regexp',
target: '_blank',
}],
},
toc: {
enable: true,
title: 'On This Page',
links: [{
title: 'Star on GitHub',
icon: 'lucide:star',
to: 'https://github.com/unjs/magic-regexp',
target: '_blank',
}, {
title: 'Create Issues',
icon: 'lucide:circle-dot',
to: 'https://github.com/unjs/magic-regexp/issues',
target: '_blank',
}],
},
search: {
enable: true,
inAside: false,
},
},
})
90 changes: 90 additions & 0 deletions docs/assets/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
@tailwind base;
@tailwind components;
@tailwind utilities;


@layer base {
:root {
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;

--card: 0 0% 100%;
--card-foreground: 240 10% 3.9%;

--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;

--primary: 320 90% 60%;
--primary-foreground: 0 0% 100%;

--secondary: 240 4.8% 95.9%;
--secondary-foreground: 240 5.9% 10%;

--muted: 240 4.8% 95.9%;
--muted-foreground: 240 3.8% 46.1%;

--accent: 240 4.8% 95.9%;
--accent-foreground: 240 5.9% 10%;

--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;

--border:240 5.9% 10%;
--input:240 5.9% 90%;
--ring:240 5.9% 10%;
--radius: 0.5rem;
}

.dark {
--background:240 10% 3.9%;
--foreground:0 0% 98%;

--card:240 10% 3.9%;
--card-foreground:0 0% 98%;

--popover:240 10% 3.9%;
--popover-foreground:0 0% 98%;

--primary: 320 90% 60%;
--primary-foreground: 0 0% 100%;

--secondary:240 3.7% 15.9%;
--secondary-foreground:0 0% 98%;

--muted:240 3.7% 15.9%;
--muted-foreground:240 5% 64.9%;

--accent:240 3.7% 15.9%;
--accent-foreground:0 0% 98%;

--destructive:0 62.8% 30.6%;
--destructive-foreground:0 0% 98%;

--border:240 3.7% 15.9%;
--input:240 3.7% 15.9%;
--ring:240 4.9% 83.9%;
}
}


@layer utilities {
.step {
counter-increment: step;
}

.step:before {
@apply absolute w-9 h-9 bg-muted rounded-full font-mono font-medium text-center text-base inline-flex items-center justify-center -indent-px border-4 border-background;
@apply -ml-[50px] -mt-1;
content: counter(step);
}
}

@layer base {
* {
@apply border-border;
}

body {
@apply bg-background text-foreground;
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ It is also possible to convert existing regular expressions to `magic-regexp` sy
```ts
import { convert } from 'magic-regexp/converter'

convert(/a|b|c/)
convert(/[abc]/)
// createRegExp(exactly('a').or('b').or('c'))

convert(/(foo)bar\d+/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ title: Contribution
## Development

- Clone this repository
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` (use `npm i -g corepack` for Node.js < 16.10)
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
- Install dependencies using `pnpm install`
- Run interactive tests using `pnpm dev`
77 changes: 77 additions & 0 deletions docs/content/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: Home
navigation: false
---

::hero
---
actions:
- name: Documentation
leftIcon: 'lucide:rocket'
to: /guide
- name: Try it out
leftIcon: 'lucide:play'
variant: outline
to: https://stackblitz.com/github/unjs/magic-regexp/tree/main/playground
---

#title
magic-regexp

#description
A compiled-away, type-safe, readable RegExp alternative.
::

::card-group
::card
---
icon: 'heroicons-cube-transparent'
icon-size: 26
---

#title
Lightweight runtime

#description
Zero-dependency, minimal runtime if no transform is used.
::

::card
---
icon: 'heroicons-wrench'
icon-size: 26
---

#title
... or pure RegExp

#description
Ships with transform to compile to pure regular expression.
::

::card
---
icon: 'heroicons-shield-check'
icon-size: 26
---

#title
Type-safe

#description
Automatically typed capture groups, with generated RegExp displaying on hover.
::

::card
---
icon: 'heroicons-book-open'
icon-size: 26
---

#title
Intuitive syntax

#description
Natural language syntax regular expression builder.
::
::
9 changes: 8 additions & 1 deletion docs/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
extends: ['shadcn-docs-nuxt'],
modules: [
'@nuxtjs/plausible',
],
compatibilityDate: '2024-07-06',
plausible: {
trackLocalhost: true,
domain: 'regexp.dev',
apiHost: 'https://v.roe.dev',
},
Expand Down
17 changes: 12 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"name": "docs",
"type": "module",
"private": true,
"scripts": {
"dev": "undocs dev",
"build": "undocs build",
"generate": "undocs build"
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"undocs": "0.2.30"
"dependencies": {
"@nuxtjs/plausible": "^1.2.0",
"nuxt": "^3.16.0",
"shadcn-docs-nuxt": "^0.8.21",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
}
}
Binary file added docs/public/favicon.ico
Binary file not shown.
File renamed without changes
Loading