forked from primus/eventemitter3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Till Sanders <[email protected]>
- Loading branch information
1 parent
db1157f
commit 7872dba
Showing
7 changed files
with
913 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Deploy Documentation | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: pages | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Not needed if lastUpdated is not enabled | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build with VitePress | ||
run: npm run docs:build | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docs/.vitepress/dist | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules/ | ||
coverage/ | ||
dist/ | ||
docs/.vitepress/dist | ||
docs/.vitepress/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { defineConfig } from 'vitepress' | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: "ESMitter", | ||
description: "ESMitter is a rewrite of the popular EventEmitter3 with a focus on modern tooling, TypeScript, and EcmaScript module syntax.", | ||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
nav: [ | ||
{ text: 'Home', link: '/' }, | ||
{ text: 'Guide', link: '/guide' }, | ||
{ text: 'API Reference', link: '/api' } | ||
], | ||
|
||
sidebar: [ | ||
{ | ||
text: 'Examples', | ||
items: [ | ||
{ text: 'Markdown Examples', link: '/markdown-examples' }, | ||
{ text: 'Runtime API Examples', link: '/api-examples' } | ||
] | ||
} | ||
], | ||
|
||
socialLinks: [ | ||
{ icon: 'npm', link: 'https://www.npmjs.com/package/esm-itter' }, | ||
{ icon: 'github', link: 'https://github.com/tillsanders/esm-itter' } | ||
] | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Guide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
# https://vitepress.dev/reference/default-theme-home-page | ||
layout: home | ||
|
||
hero: | ||
name: "ESMitter" | ||
text: "Modern, ESM-only, natively TypeScript event emitter for the browser and Node.js" | ||
tagline: ESMitter is a rewrite of the popular EventEmitter3 with a focus on modern tooling, TypeScript, and EcmaScript module syntax. | ||
actions: | ||
- theme: brand | ||
text: Get Started | ||
link: /get-started | ||
- theme: alt | ||
text: API Reference | ||
link: /api | ||
|
||
features: | ||
- title: Natively TypeScript | ||
details: Rewritten in TypeScript, ESMitter offers strongly typed event context and listeners. | ||
- title: ESM-only | ||
details: No CommonJS/UMD/AMD, just a pure EcmaScript module with modern ES6+ syntax. | ||
- title: Great Developer Experience | ||
details: The latest tooling, Unit Tests, Code Coverage, Benchmarks and decent documentation. | ||
--- | ||
|
||
::: warning | ||
This project is currently in alpha stage. | ||
::: | ||
|
Oops, something went wrong.