### Install Dependencies and Start Dev Server Source: https://github.com/maplibre/maputnik/blob/main/README.md Install project dependencies using npm and start the development server. The editor will be available at http://localhost:8888. ```bash npm install npm run start ``` -------------------------------- ### Install npm Packages Source: https://github.com/maplibre/maputnik/blob/main/AGENTS.md Run this command to install all necessary npm packages for the project. ```bash npm install ``` -------------------------------- ### Start Local Development Server Source: https://github.com/maplibre/maputnik/blob/main/src/locales/README.md Use this command to start a local instance of Maputnik for testing. This is useful for verifying new locale additions and UI changes. ```bash npm run start ``` -------------------------------- ### Run Development Server with Vite Source: https://github.com/maplibre/maputnik/blob/main/AGENTS.md Starts the development server in the background using Vite. Ensure xvfb is installed if tests are to be run. ```bash nohup npm run start & ``` -------------------------------- ### Start Externally Accessible Dev Server Source: https://github.com/maplibre/maputnik/blob/main/README.md To make the development server accessible from other devices on the network, use the `--host` option with `npm run start`. ```bash npm run start -- --host 0.0.0.0 ``` -------------------------------- ### Build Maputnik Desktop Source: https://github.com/maplibre/maputnik/blob/main/desktop/README.md Installs dependencies and builds the desktop executable for Maputnik. ```bash npm install npm run build-desktop ``` -------------------------------- ### Install xvfb Source: https://github.com/maplibre/maputnik/blob/main/AGENTS.md This command installs xvfb, a virtual framebuffer required for running tests. ```bash apt install xvfb ``` -------------------------------- ### Run Maputnik Editor Source: https://github.com/maplibre/maputnik/blob/main/desktop/README.md Starts the Maputnik editor GUI, accessible at localhost:8000. ```bash maputnik ``` -------------------------------- ### Run E2E Tests with Firefox Source: https://github.com/maplibre/maputnik/blob/main/README.md To run end-to-end tests using Cypress with Firefox, first start the development server, then execute this command, specifying the browser. ```bash npm run test -- --browser firefox ``` -------------------------------- ### Get Single Style File Source: https://github.com/maplibre/maputnik/blob/main/desktop/README.md Retrieves the contents of a single specified style file. ```APIDOC ## GET /styles/{filename} ### Description Get contents of a single style file ### Method GET ### Endpoint /styles/{filename} ``` -------------------------------- ### Run E2E Tests with Chrome Source: https://github.com/maplibre/maputnik/blob/main/README.md To run end-to-end tests using Cypress with Chrome, first start the development server, then execute this command. ```bash npm run test ``` -------------------------------- ### Build the Project Source: https://github.com/maplibre/maputnik/blob/main/AGENTS.md Run this command to build the project, typically for production deployment. ```bash npm run build ``` -------------------------------- ### Serve Static Files Source: https://github.com/maplibre/maputnik/blob/main/desktop/README.md Specifies a directory to serve under http://localhost:8000/static/, useful for sprites and glyphs. ```bash maputnik --static ./localFolder ``` -------------------------------- ### View Maputnik CLI Options Source: https://github.com/maplibre/maputnik/blob/main/README.md To see the available command-line options for Maputnik when running in Docker, use the --help flag. ```bash docker run -it --rm -p 8888:8000 ghcr.io/maplibre/maputnik:main --help ``` -------------------------------- ### List Configured Styles Source: https://github.com/maplibre/maputnik/blob/main/desktop/README.md Retrieves a list of IDs for all configured style files. ```APIDOC ## GET /styles ### Description List the ID of all configured style files ### Method GET ### Endpoint /styles ``` -------------------------------- ### Verify Code Correctness with ESLint Source: https://github.com/maplibre/maputnik/blob/main/AGENTS.md Use this command to run ESLint and check for code style and potential errors. ```bash npm run lint ``` -------------------------------- ### Run Maputnik with Docker Source: https://github.com/maplibre/maputnik/blob/main/README.md Use this command to run Maputnik in a Docker container and access it via http://localhost:8888. Press Ctrl+C to stop the server. ```bash docker run -it --rm -p 8888:8000 ghcr.io/maplibre/maputnik:main ``` -------------------------------- ### Lint JavaScript and CSS Code Source: https://github.com/maplibre/maputnik/blob/main/README.md Execute these commands to lint the JavaScript and CSS codebases, and to sort styles. ```bash npm run lint npm run lint-css npm run sort-styles ``` -------------------------------- ### Expose Local Style File Source: https://github.com/maplibre/maputnik/blob/main/desktop/README.md Allows the web-based editor to save changes to a local style file. ```bash maputnik --file basic-v9.json ``` -------------------------------- ### Open Cypress Test Runner Source: https://github.com/maplibre/maputnik/blob/main/README.md Execute this command to open the Cypress test runner, allowing you to view tests as they run or select specific suites to execute. ```bash npm run cy:open ``` -------------------------------- ### Run Cypress Tests with xvfb Source: https://github.com/maplibre/maputnik/blob/main/AGENTS.md Executes Cypress tests using xvfb-run to ensure proper environment for graphical testing. ```bash xvfb-run -a npm run test ``` -------------------------------- ### WebSocket for Style Changes Source: https://github.com/maplibre/maputnik/blob/main/desktop/README.md Listens for change events for the configured style files via a WebSocket connection. ```APIDOC ## WEBSOCKET /ws ### Description Listen to change events for the configured style files ### Method WEBSOCKET ### Endpoint /ws ``` -------------------------------- ### Watch Local Style for Changes Source: https://github.com/maplibre/maputnik/blob/main/desktop/README.md Enables editing a local style file with a text editor and seeing changes reflected in Maputnik via WebSocket. ```bash maputnik --watch --file basic-v9.json ``` -------------------------------- ### Access Previous Maputnik Editor Versions Source: https://github.com/maplibre/maputnik/wiki/Troubleshooting Use this URL pattern to access specific historical versions of the Maputnik editor. Replace `[VERSION]` with the desired version tag. ```url https://maputnik.github.io/releases/[VERSION] ``` -------------------------------- ### Specify Custom Port Source: https://github.com/maplibre/maputnik/blob/main/desktop/README.md Sets a custom port for the Maputnik editor to listen on, overriding the default port 8000. ```bash maputnik --port 8001 ``` -------------------------------- ### Fix Lint Issues with ESLint Source: https://github.com/maplibre/maputnik/blob/main/AGENTS.md Execute this command to automatically fix linting issues detected by ESLint. ```bash npm run lint -- --fix ``` -------------------------------- ### Refresh Localization Files Source: https://github.com/maplibre/maputnik/blob/main/src/locales/README.md Run this command to refresh localization files, which is necessary after adding a new language or updating feature text. This command generates or updates translation files. ```bash npm run i18n:refresh ``` -------------------------------- ### Update Style File Source: https://github.com/maplibre/maputnik/blob/main/desktop/README.md Updates the contents of a specified style file. ```APIDOC ## PUT /styles/{filename} ### Description Update contents of a style file ### Method PUT ### Endpoint /styles/{filename} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.