mirror of
https://github.com/Automattic/harper.git
synced 2025-12-23 08:48:15 +00:00
Some checks are pending
Binaries / harper-cli - macOS-aarch64 (push) Waiting to run
Binaries / harper-cli - Linux-aarch64-GNU (push) Waiting to run
Binaries / harper-cli - Linux-aarch64-musl (push) Waiting to run
Binaries / harper-cli - macOS-x86_64 (push) Waiting to run
Binaries / harper-cli - Linux-x86_64-GNU (push) Waiting to run
Binaries / harper-cli - Linux-x86_64-musl (push) Waiting to run
Binaries / harper-cli - Windows-x86_64 (push) Waiting to run
Binaries / harper-ls - macOS-aarch64 (push) Waiting to run
Binaries / harper-ls - Linux-aarch64-GNU (push) Waiting to run
Binaries / harper-ls - Linux-aarch64-musl (push) Waiting to run
Binaries / harper-ls - macOS-x86_64 (push) Waiting to run
Binaries / harper-ls - Linux-x86_64-GNU (push) Waiting to run
Binaries / harper-ls - Linux-x86_64-musl (push) Waiting to run
Binaries / harper-ls - Windows-x86_64 (push) Waiting to run
Build Web / build-web (push) Waiting to run
Chrome Plugin / chrome-plugin (push) Waiting to run
Just Checks / just build-obsidian (push) Waiting to run
Just Checks / just test-harperjs (push) Waiting to run
Just Checks / just test-obsidian (push) Waiting to run
Just Checks / just test-rust (push) Waiting to run
Just Checks / just test-vscode (push) Waiting to run
VS Code Plugin / alpine-arm64 (push) Waiting to run
VS Code Plugin / darwin-arm64 (push) Waiting to run
VS Code Plugin / linux-armhf (push) Waiting to run
VS Code Plugin / linux-x64 (push) Waiting to run
WordPress Plugin / wp-plugin (push) Waiting to run
Just Checks / just check-js (push) Waiting to run
Just Checks / just check-rust (push) Waiting to run
Just Checks / just test-chrome-plugin (push) Waiting to run
Just Checks / just test-firefox-plugin (push) Waiting to run
VS Code Plugin / alpine-x64 (push) Waiting to run
VS Code Plugin / darwin-x64 (push) Waiting to run
VS Code Plugin / linux-arm64 (push) Waiting to run
VS Code Plugin / win32-arm64 (push) Waiting to run
VS Code Plugin / win32-x64 (push) Waiting to run
247 lines
5.7 KiB
TypeScript
247 lines
5.7 KiB
TypeScript
import tailwindcss from '@tailwindcss/vite';
|
|
import { defineConfig } from 'vite';
|
|
import topLevelAwait from 'vite-plugin-top-level-await';
|
|
import wasm from 'vite-plugin-wasm';
|
|
|
|
const prod = process.env.APP_ENV === 'production';
|
|
|
|
export default defineConfig(async () => {
|
|
const [{ defaultTheme }, { sveltepress }] = await Promise.all([
|
|
import('@sveltepress/theme-default'),
|
|
import('@sveltepress/vite'),
|
|
]);
|
|
|
|
return {
|
|
ssr: {
|
|
noExternal: prod ? ['mysql2', 'drizzle-orm', 'posthog-js', 'drizzle-zod', 'zod'] : [],
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
fs: {
|
|
allow: ['../harper.js/dist'],
|
|
},
|
|
},
|
|
plugins: [
|
|
sveltepress({
|
|
siteConfig: {
|
|
title: 'Harper',
|
|
description: 'A Grammar Checker from Automattic',
|
|
},
|
|
theme: defaultTheme({
|
|
editLink:
|
|
'https://github.com/automattic/harper/edit/master/packages/web/src/routes/:route',
|
|
logo: '/circle-logo.png',
|
|
github: 'https://github.com/automattic/harper',
|
|
discord: 'https://discord.gg/invite/JBqcAaKrzQ',
|
|
themeColor: {
|
|
primary: '#818eae',
|
|
dark: '#355280',
|
|
gradient: {
|
|
start: '#355280',
|
|
end: '#818eae',
|
|
},
|
|
},
|
|
navbar: [
|
|
{ title: 'Documentation', to: '/docs/about' },
|
|
{
|
|
title: 'Visual Studio Code',
|
|
to: 'https://marketplace.visualstudio.com/items?itemName=elijah-potter.harper',
|
|
},
|
|
{ title: 'Obsidian', to: '/docs/integrations/obsidian' },
|
|
{
|
|
title: 'Chrome Extension',
|
|
to: 'https://chromewebstore.google.com/detail/private-grammar-checking/lodbfhdipoipcjmlebjbgmmgekckhpfb',
|
|
},
|
|
],
|
|
sidebar: {
|
|
'/docs/': [
|
|
{
|
|
items: [
|
|
{
|
|
title: 'About',
|
|
to: '/docs/about',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: 'Integrations',
|
|
items: [
|
|
{
|
|
title: 'Obsidian',
|
|
to: '/docs/integrations/obsidian',
|
|
},
|
|
{
|
|
title: 'Chrome Extension',
|
|
to: '/docs/integrations/chrome-extension',
|
|
},
|
|
{
|
|
title: 'Firefox Extension',
|
|
to: '/docs/integrations/firefox-extension',
|
|
},
|
|
{
|
|
title: 'WordPress',
|
|
to: '/docs/integrations/wordpress',
|
|
},
|
|
{
|
|
title: 'Language Server',
|
|
to: '/docs/integrations/language-server',
|
|
},
|
|
{
|
|
title: 'Visual Studio Code',
|
|
to: '/docs/integrations/visual-studio-code',
|
|
},
|
|
{
|
|
title: 'Neovim',
|
|
to: '/docs/integrations/neovim',
|
|
},
|
|
{
|
|
title: 'Helix',
|
|
to: '/docs/integrations/helix',
|
|
},
|
|
{
|
|
title: 'Emacs',
|
|
to: '/docs/integrations/emacs',
|
|
},
|
|
{
|
|
title: 'Zed',
|
|
to: '/docs/integrations/zed',
|
|
},
|
|
{
|
|
title: 'Sublime Text',
|
|
to: '/docs/integrations/sublime-text',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: 'harper.js',
|
|
items: [
|
|
{
|
|
title: 'Introduction',
|
|
to: '/docs/harperjs/introduction',
|
|
},
|
|
{
|
|
title: 'Linting',
|
|
to: '/docs/harperjs/linting',
|
|
},
|
|
{
|
|
title: 'Spans',
|
|
to: '/docs/harperjs/spans',
|
|
},
|
|
{
|
|
title: 'Configure Rules',
|
|
to: '/docs/harperjs/configurerules',
|
|
},
|
|
{
|
|
title: 'Node.js',
|
|
to: '/docs/harperjs/node',
|
|
},
|
|
{
|
|
title: 'CDN',
|
|
to: '/docs/harperjs/CDN',
|
|
},
|
|
{
|
|
title: 'API Reference',
|
|
to: '/docs/harperjs/ref/index.html',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: 'Contributors',
|
|
items: [
|
|
{
|
|
title: 'Introduction',
|
|
to: '/docs/contributors/introduction',
|
|
},
|
|
{
|
|
title: 'Environment',
|
|
to: '/docs/contributors/environment',
|
|
},
|
|
{
|
|
title: 'Committing',
|
|
to: '/docs/contributors/committing',
|
|
},
|
|
{
|
|
title: 'Architecture',
|
|
to: '/docs/contributors/architecture',
|
|
},
|
|
{
|
|
title: 'Dictionary',
|
|
to: '/docs/contributors/dictionary',
|
|
},
|
|
{
|
|
title: 'Test Suite',
|
|
to: '/docs/contributors/tests',
|
|
},
|
|
{
|
|
title: 'Author a Rule',
|
|
to: '/docs/contributors/author-a-rule',
|
|
},
|
|
{
|
|
title: 'Visual Studio Code',
|
|
to: '/docs/contributors/visual-studio-code',
|
|
},
|
|
{
|
|
title: 'Chrome Extension',
|
|
to: '/docs/contributors/chrome-extension',
|
|
},
|
|
{
|
|
title: 'WordPress',
|
|
to: '/docs/contributors/wordpress',
|
|
},
|
|
{
|
|
title: 'Obsidian',
|
|
to: '/docs/contributors/obsidian',
|
|
},
|
|
{
|
|
title: 'Reviewing Pull Requests',
|
|
to: '/docs/contributors/review',
|
|
},
|
|
{
|
|
title: 'Local Statistics',
|
|
to: '/docs/contributors/local-stats',
|
|
},
|
|
{
|
|
title: 'Brill Tagging',
|
|
to: '/docs/contributors/brill',
|
|
},
|
|
{
|
|
title: 'FAQ',
|
|
to: '/docs/contributors/faq',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: 'Rust Reference',
|
|
to: 'https://docs.rs/harper-core/latest/harper_core/',
|
|
},
|
|
{
|
|
title: 'Rules',
|
|
to: '/docs/rules',
|
|
},
|
|
],
|
|
},
|
|
highlighter: {
|
|
languages: [
|
|
'svelte',
|
|
'sh',
|
|
'js',
|
|
'html',
|
|
'ts',
|
|
'md',
|
|
'css',
|
|
'scss',
|
|
'toml',
|
|
'rust',
|
|
'lua',
|
|
'json',
|
|
'elisp',
|
|
],
|
|
},
|
|
}),
|
|
}),
|
|
wasm(),
|
|
topLevelAwait(),
|
|
tailwindcss(),
|
|
],
|
|
};
|
|
});
|