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
1 change: 1 addition & 0 deletions eslint.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ const disabledTypeCheckConfig: ConfigWithExtends = {
"**/docusaurus.config.mts",
"**/mdx-components.tsx",
"**/eslintConfig.ts",
"**/vite.config.ts",
"eslint.config.mts",
"prettier.config.cjs",
"typings/**",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint:ts": "eslint packages",
"lint:prettier": "prettier --check .",
"lint": "pnpm run lint:meta && pnpm run lint:syncpack && pnpm run lint:ts",
"init-vscode-sandbox": "pnpm -F=@cursorless/cursorless-vscode init-launch-sandbox",
"init-vscode-sandbox": "pnpm -F @cursorless/cursorless-vscode init-launch-sandbox",
"meta-updater": "env NODE_OPTIONS='--import=tsx --conditions=cursorless:bundler' meta-updater",
"preinstall": "npx only-allow pnpm",
"test-compile": "tsc --build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
<title>Cursorless Cheatsheet</title>

<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" type="image/x-icon" href="./src/favicon.ico" />
<script id="cheatsheet-data">
// Dummy data for use in debugging
document.cheatsheetInfo = <%= fakeCheatsheetInfo %>;
document.cheatsheetInfo = __FAKE_CHEATSHEET_INFO__;
</script>
</head>
<body class="<%= bodyClasses %>">
<body class="__BODY_CLASSES__">
<div id="root"></div>
<script type="module" src="./src/index.tsx"></script>
</body>
</html>
22 changes: 7 additions & 15 deletions packages/cheatsheet-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,30 @@
"compile": "tsc --build",
"watch": "tsc --build --watch",
"build": "pnpm build:prod",
"build:dev": "pnpm webpack --mode=development",
"build:prod": "pnpm webpack --mode=production --node-env=production",
"webpack": "env NODE_OPTIONS=--loader=ts-node/esm webpack --config ./src/webpack.config.ts",
"build:dev": "vite build --mode development",
"build:prod": "vite build --mode production",
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
},
"dependencies": {
"@cursorless/cheatsheet": "workspace:*",
"react": "^19.2.4",
"react-dom": "^19.2.4"
"react-dom": "^19.2.4",
"tslib": "^2.8.1"
},
"devDependencies": {
"@effortlessmotion/html-webpack-inline-source-plugin": "^1.0.3",
"@tailwindcss/postcss": "^4.2.1",
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.2",
"@types/jest": "^30.0.0",
"@types/node": "^24.12.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@types/webpack": "^5.28.5",
"css-loader": "^7.1.4",
"html-webpack-plugin": "^5.6.6",
"@vitejs/plugin-react": "^5.1.0",
"jest": "^30.2.0",
"postcss": "^8.5.8",
"postcss-loader": "^8.2.1",
"style-loader": "^4.0.0",
"tailwindcss": "^4.2.1",
"ts-loader": "^9.5.4",
"ts-node": "^10.9.2",
"typescript": "^5.9.3",
"webpack": "^5.105.4",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.3"
"vite": "^7.1.7",
"vite-plugin-singlefile": "^2.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/cheatsheet-local/src/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@import "tailwindcss";

@config "../tailwind.config.js";
@config "../tailwind.config.mjs";
62 changes: 0 additions & 62 deletions packages/cheatsheet-local/src/webpack.config.ts

This file was deleted.

37 changes: 37 additions & 0 deletions packages/cheatsheet-local/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import {
cheatsheetBodyClasses,
fakeCheatsheetInfo,
} from "@cursorless/cheatsheet";
import react from "@vitejs/plugin-react";
import { defineConfig, type PluginOption } from "vite";
import { viteSingleFile } from "vite-plugin-singlefile";

export default defineConfig(() => {
return {
build: {
outDir: "dist",

rollupOptions: {
input: {
index: "./index.html",
},
},
},

plugins: [react(), viteSingleFile(), injectCheatsheetTemplateData()],
};
});

function injectCheatsheetTemplateData(): PluginOption {
return {
name: "inject-cheatsheet-template-data",
transformIndexHtml(html) {
return html
.replaceAll("__BODY_CLASSES__", cheatsheetBodyClasses)
.replaceAll(
"__FAKE_CHEATSHEET_INFO__",
JSON.stringify(fakeCheatsheetInfo),
);
},
};
}
15 changes: 12 additions & 3 deletions packages/cursorless-org-docs/docusaurus.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ const config: Config = {
tagline: "Structural voice coding at the speed of thought",
url: "https://www.cursorless.org",
baseUrl: "/docs/",
onBrokenLinks: "throw",
onBrokenAnchors: "throw",
trailingSlash: true,

future: {
v4: {
removeLegacyPostBuildHeadAttribute: true,
},
experimental_faster: true,
},

stylesheets: [
// Icons generated with https://favicon.io/favicon-generator/
{
Expand Down Expand Up @@ -119,9 +130,6 @@ const config: Config = {
},
{ rel: "shortcut icon", href: "/favicon.ico?v=1" },
],
onBrokenLinks: "throw",
onBrokenAnchors: "throw",
trailingSlash: true,

markdown: {
hooks: {
Expand Down Expand Up @@ -151,6 +159,7 @@ const config: Config = {
},
],
],

plugins: [
"./src/plugins/tailwind-plugin.ts",
"./src/plugins/scope-tests-plugin.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/cursorless-org-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@cursorless/common": "workspace:*",
"@docsearch/react": "^4.6.0",
"@docusaurus/core": "^3.9.2",
"@docusaurus/faster": "^3.9.2",
"@docusaurus/preset-classic": "^3.9.2",
"@docusaurus/theme-classic": "^3.9.2",
"@docusaurus/theme-common": "^3.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-org-docs/src/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "tailwindcss";

@config "../../tailwind.config.js";
@config "../../tailwind.config.mjs";

/* From https://github.com/facebook/docusaurus/blob/cc0bceab9c1678303f6237f5526753edc1b12fc3/website/src/css/custom.css#L70-L86 */
.header-github-link:hover {
Expand Down
25 changes: 6 additions & 19 deletions packages/cursorless-org/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,13 @@ const references = JSON.parse(

/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ["@svgr/webpack"],
});

// Set our custom condition for the bundler so that we directly use
// typescript from packages in our monorepo, which makes hot-reloading
// smoother. Based on
// https://github.com/vercel/next.js/discussions/33813#discussioncomment-7457277
config.plugins.push({
apply(compiler) {
compiler.hooks.afterEnvironment.tap("NextEntryPlugin", () => {
compiler.options.resolve.conditionNames.push("cursorless:bundler");
});
turbopack: {
rules: {
"*.svg": {
loaders: ["@svgr/webpack"],
as: "*.js",
},
});

return config;
},
Comment thread
AndreasArvidsson marked this conversation as resolved.
},
experimental: {
mdxRs: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-org/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"scripts": {
"dev": "next dev",
"build": "next build --webpack",
"build": "next build",
"start": "http-server out -a 127.0.0.1 -p 8085",
"lint": "next lint",
"compile": "tsc --build",
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-org/src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "tailwindcss";

@config "../../tailwind.config.js";
@config "../../tailwind.config.mjs";
Comment thread
AndreasArvidsson marked this conversation as resolved.

:root {
--safe-area-inset-top: env(safe-area-inset-top);
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-vscode-tutorial-webview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"watch:tsc": "pnpm compile:tsc --watch",
"watch:esbuild": "pnpm build:esbuild --watch",
"watch:tailwind": "pnpm build:tailwind --watch",
"watch": "pnpm run --filter @cursorless/cursorless-vscode-tutorial-webview --parallel '/^watch:.*/'",
"watch": "pnpm run -F @cursorless/cursorless-vscode-tutorial-webview --parallel '/^watch:.*/'",
"build:esbuild": "bash ./compile-esbuild.sh",
"build:tailwind": "pnpx @tailwindcss/cli -i ./src/index.css -o ./out/index.css",
"build": "pnpm build:prod",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "tailwindcss";

@config "../tailwind.config.js";
@config "../tailwind.config.mjs";
Comment thread
AndreasArvidsson marked this conversation as resolved.

@theme {
--text-2xs: 0.625rem;
Expand Down
Loading
Loading