Bash & dev tools explorers — interactive concept guides for bash, regex, grep, sed/awk, git, and GitLab CI with code samples and live demos. Built with Vite, React, TypeScript, and Tailwind CSS, deployable to GitHub Pages.
npm install
npm run devOpen http://localhost:5173. Use the home page to jump to any explorer.
| Command | Description |
|---|---|
npm run dev |
Start dev server (HMR) |
npm run build |
Production build → dist/ |
npm run preview |
Preview production build |
npm run deploy |
Build and publish to GitHub Pages (gh-pages branch) |
The app uses a relative base (base: './') so the same build works at the site root or under a subpath (e.g. https://user.github.io/ohtodev/). The router detects the base path at load time.
-
Build and deploy
Runnpm run build, then deploy thedist/folder (e.g. push to thegh-pagesbranch or use GitHub Actions). -
One-command deploy (if
gh-pagesis installed):npm run deploy
This builds and pushes
dist/to thegh-pagesbranch. In the repo: Settings → Pages → Source: Deploy from a branch → Branch: gh-pages, / (root). -
404 handling
The build copiesindex.htmlto404.htmlso direct URLs and refreshes on client-side routes work on GitHub Pages.
- Vite + React + TypeScript + Tailwind CSS + React Router
- Home and layout use Tailwind; explorer pages keep inline design tokens for their dense UIs
- Best practices: strict TypeScript, path alias
@/, custom hooks and constants, React Router v7 future flag, deploy-friendly base path
├── index.html
├── vite.config.js
├── tailwind.config.js
├── postcss.config.js
├── tsconfig.json
├── src/
│ ├── main.tsx # Entry, StrictMode
│ ├── App.tsx # Router, routes, basename
│ ├── index.css # Tailwind + base styles
│ ├── vite-env.d.ts
│ ├── constants/
│ │ ├── routes.ts # ROUTE_PATHS for basename detection
│ │ └── explorers.ts # EXPLORERS list + ExplorerItem type
│ ├── hooks/
│ │ └── useBasename.ts # Router basename (root vs subpath)
│ ├── types/
│ │ └── index.ts # Re-exports shared types
│ └── pages/
│ ├── Home.tsx
│ ├── BashExplorer.tsx
│ ├── RegexExplorer.tsx
│ ├── GrepExplorer.tsx
│ ├── GitExplorer.tsx
│ ├── GitlabCIExplorer.tsx
│ └── SedAwkExplorer.tsx
Routes: /, /bash, /regex, /grep, /git, /gitlab-ci, /sed-awk.