Skip to main content

How to install doxygen2docusaurus

GitHub package.json version NPM Version NPM Downloads NPM Downloads license

Prerequisites

Installing doxygen2docusaurus requires:

  • A recent version of Node.js (specified as "engines.node": ">=20.0")
  • A recent version of npm which is installed alongside Node.js

For those new to Node.js, it is highly recommended to read the instructions on the xPack Prerequisites page.

Quick instructions

For those who have already completed the installation steps on the xPack Prerequisites page and are familiar with the process, here are the necessary commands. Simply copy and paste them into your terminal. When you hover the mouse over the command, a copy button will appear on the right side; click it to copy the command.

Download the Windows Prebuilt Installer (a node-v*-x64.msi file) from the Download Node.js page. Select the latest LTS version and install it as usual, ensuring you have administrative rights.

tip

Unless specifically required, refrain from selecting the Tools for Native Modules during installation, as this will result in the installation of some very large Microsoft tools.

Although not mandatory, it is recommended to update npm to the latest version:

npm install -location=global npm@latest

Update the user Path and make it persistent:

set Path=%APPDATA%\npm;%Path%
setx Path "%APPDATA%\npm;%Path%"

Configure PowerShell to allow the execution of node.js applications:

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser

Installation

The package is available as @xpack/doxygen2docusaurus from the public npmjs repository; it may be added as a development dependency to any npm project or it may be installed into the user's global environment.

Project installation

The command to install the latest available version of @xpack/doxygen2docusaurus as a development dependency in an npm project is:

npm install @xpack/doxygen2docusaurus@latest --save-dev

For a specific version, use the explicit version numbers:

npm install @xpack/doxygen2docusaurus@2.1.0 --save-dev

Global installation

Since the package includes command-line tools, it may also be installed globally and utilised in any project.

npm install --location=global @xpack/doxygen2docusaurus@latest

For a specific version, use the explicit version numbers:

npm install --location=global @xpack/doxygen2docusaurus@2.1.0

On Windows, global Node.js packages are installed in the user home folder, within %APPDATA%\npm (such as C:\Users\ilg\AppData\Roaming\npm), and managing packages does not require administrative rights.

The result of installing @xpack/doxygen2docusaurus is a set of files in the %APPDATA%\npm folder:

C:\>dir "%APPDATA%"\npm\doxygen2docusaurus*
Volume in drive C has no label.
Volume Serial Number is B02D-925C

Directory of C:\Users\ilg\AppData\Roaming\npm

29/07/2024 07:24 397 doxygen2docusaurus
29/07/2024 07:24 329 doxygen2docusaurus.cmd
29/07/2024 07:24 821 doxygen2docusaurus.ps1
3 File(s) 1,547 bytes
0 Dir(s) 39,088,439,296 bytes free

If you followed the instructions in the prerequisites section, you should already have this path configured and the programme should start normally:

C:>doxygen2docusaurus --version
2.1.0

Uninstall

The command to remove @xpack/doxygen2docusaurus from a project is:

npm uninstall @xpack/doxygen2docusaurus

The command to remove @xpack/doxygen2docusaurus from the global user environment is:

npm uninstall --location=global @xpack/doxygen2docusaurus

npx

If, for any reason, you decide not to install @xpack/doxygen2docusaurus, you can still benefit from it by utilising the npx command, as a trampoline to start doxygen2docusaurus:

$ npx --package @xpack/doxygen2docusaurus -- doxygen2docusaurus --version
2.1.0

However, for regular use, this method may be less convenient, as invoking npx requires a more verbose command.

npm folders

For more details on the folders used by npm, refer to npm-folders.