### Set Up Your Environment Source: https://github.com/nodejs/nodejs.org/blob/main/CONTRIBUTING.md Commands to fork, clone, install dependencies, and start the development server for the Node.js website. ```bash # Fork and clone the repository git clone https://github.com/YOUR_USERNAME/nodejs.org.git cd nodejs.org # Install dependencies pnpm install --frozen-lockfile # Start development server node --run dev ``` -------------------------------- ### Install Dependencies Source: https://github.com/nodejs/nodejs.org/blob/main/docs/getting-started.md Command to install project dependencies using pnpm. ```bash pnpm install --frozen-lockfile ``` -------------------------------- ### Start the Development Server Source: https://github.com/nodejs/nodejs.org/blob/main/docs/getting-started.md Command to start the local development server. ```bash pnpm dev # starts a development environment at http://localhost:3000/ ``` -------------------------------- ### Create Installation Snippet Source: https://github.com/nodejs/nodejs.org/blob/main/docs/downloads-page.md Example of adding installation instructions for a new method in `apps/site/snippets/en/download/exampleMethod.bash`. ```bash # apps/site/snippets/en/download/exampleMethod.bash # Install Node.js ${props.version} using Example Method curl -fsSL https://example.com/install.sh | bash -s -- ${props.version} # Verify installation node --version npm --version ``` -------------------------------- ### Install and run the development server Source: https://github.com/nodejs/nodejs.org/blob/main/README.md Commands to install dependencies and start the local development server. ```bash pnpm install --frozen-lockfile pnpm dev # Listening at http://localhost:3000 ``` -------------------------------- ### Other Commands Source: https://github.com/nodejs/nodejs.org/blob/main/docs/getting-started.md Miscellaneous CLI commands. ```bash pnpm scripts:release-post -- --version=vXX.X.X --force - Generate release post pnpm storybook - Start Storybook development server pnpm storybook:build - Build Storybook for publishing ``` -------------------------------- ### Multi-line Snippet Instructions Source: https://github.com/nodejs/nodejs.org/blob/main/docs/downloads-page.md Example of a multi-line installation script snippet using template literal syntax for dynamic values. ```bash # Download and install Node.js ${props.version} # Step 1: Download the installer wget https://example.com/node-${props.version}-installer.sh # Step 2: Make it executable chmod +x node-${props.version}-installer.sh # Step 3: Run the installer sudo ./node-${props.version}-installer.sh # Step 4: Verify installation node --version # Should output: v${props.version} npm --version ``` -------------------------------- ### Create Installation Icon Source: https://github.com/nodejs/nodejs.org/blob/main/docs/downloads-page.md Example of creating a new installation icon component in `@node-core/ui-components/Icons/InstallationMethod/YourIconImage.tsx` and exporting it. ```tsx // @node-core/ui-components/Icons/InstallationMethod/YourIconImage.tsx import type { FC, SVGProps } from 'react'; const YourIconImage: FC> = props => ( {/* Your SVG content */} ); export default YourIconImage; ``` ```tsx // @node-core/ui-components/Icons/InstallationMethod/index.tsx export { default as YourIconImage } from './YourIconImage'; // ...other exports ``` -------------------------------- ### Development Commands Source: https://github.com/nodejs/nodejs.org/blob/main/docs/getting-started.md CLI commands for local development and building. ```bash pnpm dev - Start local development server pnpm build - Build for production (Vercel deployments) pnpm deploy - Build for export (Legacy server) pnpm start - Start server with built content ```