### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Install Axios using bower Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Packages/Axios/Axios-intro Installs the Axios library using the bower package manager. Bower is a front-end package manager. ```bash $ bower install axios ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Install Axios using pnpm Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Packages/Axios/Axios-intro Installs the Axios library using the pnpm package manager. pnpm is a fast, disk-space-efficient package manager. ```bash $ pnpm add axios ``` -------------------------------- ### Clone Uptime Watcher Repository and Install Dependencies Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Clones the Uptime Watcher repository from GitHub, navigates into the project directory, and installs all project dependencies using npm. It also includes commands to verify the installation. ```bash # Clone the repository git clone https://github.com/Nick2bad4u/Uptime-Watcher.git cd Uptime-Watcher # Install dependencies npm install # Verify installation npm run type-check:all npm run lint npm run test ``` -------------------------------- ### Bash Code Block Example Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/DOCUMENTATION_STYLE_GUIDE An example of a well-formatted code block in Markdown, demonstrating shell commands for installing dependencies and starting a development server. It includes comments to explain the actions. ```bash # Install dependencies npm install # Start development server npm run dev ``` -------------------------------- ### Untitled No description -------------------------------- ### Install Axios using npm Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Packages/Axios/Axios-intro Installs the Axios library using the npm package manager. This is a common method for Node.js projects and projects using build tools. ```bash $ npm install axios ``` -------------------------------- ### Run Build and Development Scripts (npm) Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Standard npm scripts for building the project and starting development servers. Includes options for Vite, Electron, and concurrent execution. ```bash # Build verification npm run build # Start development npm run dev # Vite dev server only npm run electron-dev # Concurrent Vite + Electron npm run start-both # Alias for electron-dev # Available Development Scripts # Main development commands npm run dev # Start Vite dev server only npm run electron-dev # Start both Vite and Electron (recommended) npm run start-both # Alias for electron-dev npm run electron # Start Electron main process only # Development with debugging npm run electron-dev:debug # Start with debugging enabled npm run debug:electron # Debug Electron main process # Build commands npm run build # Build both Vite and Electron npm run build:electron-vite # Build using Vite configuration npm run copy-wasm # Copy SQLite WASM files # Testing commands npm run test # Run all tests npm run test:coverage # Run tests with coverage npm run test:electron # Run Electron/backend tests npm run test:frontend # Run frontend tests npm run test:shared # Run shared utility tests ``` -------------------------------- ### Install Build Essentials and Node.js (Linux) Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Linux commands to update package lists, install essential build tools (like compilers), Git, curl, and Node.js version 20.x from NodeSource. ```bash sudo apt update sudo apt install build-essential git curl curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt-get install -y nodejs ``` -------------------------------- ### Install Axios using yarn Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Packages/Axios/Axios-intro Installs the Axios library using the yarn package manager. Yarn is an alternative to npm for managing JavaScript packages. ```bash $ yarn add axios ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Install Windows Build Tools (npm) Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Global npm installation of Windows-specific build tools, often required for compiling native Node.js modules on Windows. ```bash npm install --global windows-build-tools ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Initialize Uptime Watcher Database and Run Development Server Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Copies necessary WASM files for the database and then starts the Uptime Watcher development server. This sequence is used to verify the database setup and launch the application in development mode. ```bash # Copy WASM files (should happen automatically) npm run copy-wasm # Verify database setup npm run electron-dev ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Import Axios CommonJS modules Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Packages/Axios/Axios-intro Provides examples for importing Axios's CommonJS modules directly, which can be useful if a module bundler fails to resolve them automatically. Separate imports are shown for browser and Node.js environments. ```javascript const axios = require('axios/dist/browser/axios.cjs'); // browser ``` ```javascript const axios = require('axios/dist/node/axios.cjs'); // node ``` -------------------------------- ### Start Development Server (Bash) Source: https://nick2bad4u.github.io/Uptime-Watcher/_media/Testing/PLAYWRIGHT_CODEGEN_GUIDE Initiates the development server for the application, typically used before running codegen or other testing commands. This command assumes 'npm' is installed and the project has a 'dev' script defined in its package.json. ```bash npm run dev ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Generate Playwright Tests (Bash) Source: https://nick2bad4u.github.io/Uptime-Watcher/_media/Testing/PLAYWRIGHT_CODEGEN_GUIDE Launches Playwright's codegen tool to record user interactions in a browser, starting from a specified URL. The generated code can then be saved and adapted for automated testing. This command requires Playwright to be installed in the project. ```bash npx playwright codegen http://localhost:5173 ``` -------------------------------- ### Install Homebrew Packages (macOS) Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP macOS commands to install Git and Node.js using the Homebrew package manager. Homebrew simplifies software installation on macOS. ```bash brew install git node ``` -------------------------------- ### Untitled No description -------------------------------- ### Install Husky Git Hooks Manually Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Manually installs the Git hooks managed by Husky. This command is typically run after `npm install` if hooks are not automatically set up. ```bash # Hooks are automatically installed via npm install # But you can manually install if needed npx husky install ``` -------------------------------- ### Untitled No description -------------------------------- ### Install Node.js on Windows using Chocolatey Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Installs Node.js version 20.15.0 on Windows using the Chocolatey package manager. This command assumes Chocolatey is already installed. ```bash # Windows (using Chocolatey) choco install nodejs --version=20.15.0 ``` -------------------------------- ### Untitled No description -------------------------------- ### Install and Use Node.js via NVM (macOS/Linux) Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Installs Node Version Manager (nvm) and then installs and uses Node.js version 20.15. This is recommended for managing Node.js versions on macOS and Linux systems. ```bash # Using Node Version Manager (recommended) # macOS/Linux curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash nvm install 20.15 nvm use 20.15 ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Install Global Development Tools (npm) Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Installs essential global npm packages for development, including commitlint, ESLint, Prettier, TypeScript, ts-node, and nodemon. ```bash # Install globally useful development tools npm install -g @commitlint/cli npm install -g eslint npm install -g prettier npm install -g typescript npm install -g ts-node npm install -g nodemon ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### macOS Terminal Setup (Bash/Shell) Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Instructions for installing Homebrew and essential development tools like tree and jq on macOS. Uses shell commands for package management. ```bash # Install Homebrew (if not already installed) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install useful tools brew install tree brew install jq ``` -------------------------------- ### Windows Terminal Setup (PowerShell) Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Commands to enable developer mode and install Windows Terminal using PowerShell. Requires administrator privileges for execution policy changes. ```powershell # Enable developer mode Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser # Install Windows Terminal (recommended) winget install Microsoft.WindowsTerminal ``` -------------------------------- ### Verify Node.js and npm Installation Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Checks the installed versions of Node.js and npm. Ensures that the versions meet the project's requirements (Node.js 20.15+ and npm 10+). ```bash node --version # Should be 20.15+ npm --version # Should be 10+ ``` -------------------------------- ### Untitled No description -------------------------------- ### Linux Terminal Setup (Bash/Zsh) Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Commands to update package lists and install useful development tools such as tree, jq, curl, and wget on Linux systems using apt. ```bash # Install useful tools sudo apt update sudo apt install tree jq curl wget ``` -------------------------------- ### Untitled No description -------------------------------- ### Install Xcode Command Line Tools (macOS) Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP macOS command to install the Xcode command line tools, which include essential development utilities like compilers and Git. ```bash xcode-select --install ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Start Local Docusaurus Development Server (Windows Optimized) Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/DOCUSAURUS_SETUP_GUIDE This command starts the Docusaurus development server with configurations optimized for local Windows development. It allows for hot-reloading and live previews of documentation changes. ```bash npm run docs:typedoc:local npm run docusaurus:start:local ``` -------------------------------- ### Untitled No description -------------------------------- ### Install VS Code Extensions for Uptime Watcher Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/ENVIRONMENT_SETUP Installs essential VS Code extensions for TypeScript development, Tailwind CSS, ESLint, Prettier, Jest, and Playwright using the VS Code command-line interface. ```bash # Install via command line code --install-extension ms-vscode.vscode-typescript-next code --install-extension bradlc.vscode-tailwindcss code --install-extension ms-vscode.vscode-eslint code --install-extension esbenp.prettier-vscode code --install-extension ms-vscode.vscode-jest code --install-extension ms-playwright.playwright ``` -------------------------------- ### Build and Serve Documentation Locally Source: https://nick2bad4u.github.io/Uptime-Watcher/documents/docs/Guides/DOCUSAURUS_SETUP_GUIDE This command first builds the documentation site using local configurations and then serves the built site locally. This is useful for testing the production-like build output before deployment. ```bash npm run docs:build:local npm run docusaurus:serve:local ``` -------------------------------- ### Untitled No description -------------------------------- ### Run Playwright Codegen Helper Script Source: https://nick2bad4u.github.io/Uptime-Watcher/_media/Testing/PLAYWRIGHT_CODEGEN_GUIDE Execute the provided helper script to simplify Playwright codegen setup. This script can start a development server, handle command setup, and work with custom viewports or output files. It offers options for help, custom viewports, and specifying output files. ```bash node scripts/codegen.mjs # With custom viewport node scripts/codegen.mjs --viewport=1920x1080 # Save to specific file node scripts/codegen.mjs --output=my-test.ts # Show help node scripts/codegen.mjs --help ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description