Installation & Development
Get started with TeXlyre development in minutes.
Prerequisites
- Node.js 18 or higher
- Modern browser with File System Access API support (Chrome, Edge recommended)
- Git for cloning the repository
Installation
Clone the repository and install dependencies:
- npm
- Yarn
- pnpm
- Bun
git clone https://github.com/TeXlyre/texlyre.git
cd texlyre
npm install
git clone https://github.com/TeXlyre/texlyre.git
cd texlyre
yarn install
git clone https://github.com/TeXlyre/texlyre.git
cd texlyre
pnpm install
git clone https://github.com/TeXlyre/texlyre.git
cd texlyre
bun install
Development Commands
Quick Start
Run the production build locally with tests:
- npm
- Yarn
- pnpm
- Bun
npm run start
yarn run start
pnpm run start
bun run start
This command:
- Builds the production version
- Runs all tests
- Starts a local preview server (on port
:4173
)
Development Server
Start the development server with hot reload:
- npm
- Yarn
- pnpm
- Bun
npm run dev
yarn dev
pnpm run dev
bun run dev
Access the application at http://localhost:5173
HTTPS Development
For testing WebRTC features that require HTTPS:
- npm
- Yarn
- pnpm
- Bun
npm run dev:https
yarn dev:https
pnpm run dev:https
bun run dev:https
Access the application at https://localhost:5173
Build Commands
Development Build
Fast build for local testing:
- npm
- Yarn
- pnpm
- Bun
npm run build
yarn build
pnpm run build
bun run build
Production Build
Full production build with all optimizations:
- npm
- Yarn
- pnpm
- Bun
npm run build:prod
yarn build:prod
pnpm run build:prod
bun run build:prod
This includes:
- Config generation
- Service worker versioning
- Plugin index generation
- Font manifest generation
- TypeScript compilation
- Vite production build
Preview Production Build
Preview the production build locally:
- npm
- Yarn
- pnpm
- Bun
npm run preview
yarn preview
pnpm run preview
bun run preview
Testing
Run All Tests
- npm
- Yarn
- pnpm
- Bun
npm run test
yarn run test
pnpm run test
bun run test
Watch Mode
Run tests in watch mode during development:
- npm
- Yarn
- pnpm
- Bun
npm run test:watch
yarn test:watch
pnpm run test:watch
bun run test:watch
Coverage Report
Generate test coverage report:
- npm
- Yarn
- pnpm
- Bun
npm run test:coverage
yarn test:coverage
pnpm run test:coverage
bun run test:coverage
Specific Test Suites
Run specific test categories:
- npm
- Yarn
- pnpm
- Bun
npm run test:unit
npm run test:integration
npm run test:components
npm run test:services
yarn test:unit
yarn test:integration
yarn test:components
yarn test:services
pnpm run test:unit
pnpm run test:integration
pnpm run test:components
pnpm run test:services
bun run test:unit
bun run test:integration
bun run test:components
bun run test:services
CI Tests
Run tests in CI mode (used by GitHub Actions):
- npm
- Yarn
- pnpm
- Bun
npm run test:ci
yarn test:ci
pnpm run test:ci
bun run test:ci
Code Quality
Linting
Check code quality with ESLint:
- npm
- Yarn
- pnpm
- Bun
npm run lint
yarn lint
pnpm run lint
bun run lint
Auto-fix
Fix linting issues and format code:
- npm
- Yarn
- pnpm
- Bun
npm run clean
yarn clean
pnpm run clean
bun run clean
This runs ESLint with auto-fix and Biome formatter.
Utility Commands
Clear Cache
Clear build and cache directories:
- npm
- Yarn
- pnpm
- Bun
npm run clean:cache
yarn clean:cache
pnpm run clean:cache
bun run clean:cache
Generate Configs
Generate configuration files:
- npm
- Yarn
- pnpm
- Bun
npm run generate-configs
yarn generate-configs
pnpm run generate-configs
bun run generate-configs
Generate Plugin Index
Regenerate the plugin registry:
- npm
- Yarn
- pnpm
- Bun
npm run generate-plugins
yarn generate-plugins
pnpm run generate-plugins
bun run generate-plugins
Generate Font Manifest
Regenerate the font manifest:
- npm
- Yarn
- pnpm
- Bun
npm run generate-fonts
yarn generate-fonts
pnpm run generate-fonts
bun run generate-fonts
Common Workflows
First-Time Setup
- npm
- Yarn
- pnpm
- Bun
git clone https://github.com/TeXlyre/texlyre.git
cd texlyre
npm install
npm run dev
git clone https://github.com/TeXlyre/texlyre.git
cd texlyre
yarn install
yarn dev
git clone https://github.com/TeXlyre/texlyre.git
cd texlyre
pnpm install
pnpm run dev
git clone https://github.com/TeXlyre/texlyre.git
cd texlyre
bun install
bun run dev
Before Committing
- npm
- Yarn
- pnpm
- Bun
npm run clean
npm run test
yarn clean
yarn run test
pnpm run clean
pnpm run test
bun run clean
bun run test
Local Production Testing
- npm
- Yarn
- pnpm
- Bun
npm run start
yarn run start
pnpm run start
bun run start
Debugging WebRTC Features
- npm
- Yarn
- pnpm
- Bun
npm run dev:https
yarn dev:https
pnpm run dev:https
bun run dev:https
Then open https://localhost:5173
in your browser.
Troubleshooting
Port Already in Use
If port 5173 is already in use, Vite will automatically try the next available port (5174, 5175, etc.).
HTTPS Certificate Warnings
When using npm run dev:https
, your browser will show a security warning for the self-signed certificate. This is expected for local development. Click "Advanced" and proceed to the site.
Build Failures
If you encounter build failures:
- Clear the cache:
npm run clean:cache
- Remove
node_modules
:rm -rf node_modules
- Reinstall dependencies:
npm install
- Try building again:
npm run build:prod
Test Failures
If tests fail:
- Ensure all dependencies are installed
- Clear Jest cache:
npx jest --clearCache
- Run tests again:
npm run test