diff --git a/docs/get-started/installation.md b/docs/get-started/installation.md index 8b4f2c0d..c4e72e8b 100644 --- a/docs/get-started/installation.md +++ b/docs/get-started/installation.md @@ -8,7 +8,7 @@ Downloading and running Doc Detective is straightforward. Follow these steps to 1. Install prerequisites: - - [Node.js](https://nodejs.org/) v18 or later + - [Node.js](https://nodejs.org/) v18.20.0 or later 2. In a terminal, install Doc Detective globally: diff --git a/docs/get-started/installation/index.mdx b/docs/get-started/installation/index.mdx new file mode 100644 index 00000000..357eb8c3 --- /dev/null +++ b/docs/get-started/installation/index.mdx @@ -0,0 +1,53 @@ +--- +sidebar_label: Installation +--- + +import spec from "./sample.spec.json"; +import CodeBlock from '@theme/CodeBlock'; + +# Installation + +Downloading and running Doc Detective is straightforward. Follow these steps to install Doc Detective and run your first test: + +1. Install prerequisites: + + - [Node.js](https://nodejs.org/) v18.20.0 or later + +2. In a terminal, install Doc Detective globally: + + + npm i -g doc-detective + + {/* step runShell: "npm i -g doc-detective" */} + + :::note + + If you're working in a local copy of the `doc-detective` repository, you need to run `npm i` to install local dependencies. + + ::: + +3. Save this file to your current directory as _sample.spec.json_: + + + {JSON.stringify(spec, null, 2)} + + +4. Run a test, pointing to the file you just created: + + + npx doc-detective --input sample.spec.json + + {/* step runShell: + command: "npx doc-detective --input sample.spec.json" + workingDirectory: "." */} + + +Congratulations! You've run your first test with Doc Detective. :tada: + +You should see output in the terminal indicating the progress and results of the test. Results are also saved in a `testResults-.json` file in the current directory (configurable with the `--output` option), and this test saves a screenshot to example.png: + +[![Sample test screenshot](./example.png)](./example.png) + +## Next steps + +Next up, take a look at some of the [concepts](/docs/get-started/concepts) native to Doc Detective, check out some of the guided [tutorials](/docs/category/tutorials), or explore how to write [tests](/docs/get-started/tests) and [actions](/docs/category/actions) to automate your documentation testing. \ No newline at end of file diff --git a/package.json b/package.json index f9c15066..069eb7c6 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "@mui/material": "^7.3.1", "clsx": "^2.1.1", "doc-detective-common": "^3.3.0", + "docusaurus-json-schema-plugin": "^1.15.0", "dotenv": "^17.2.1", "https-browserify": "^1.0.0", "os-browserify": "^0.3.0", @@ -75,6 +76,6 @@ ] }, "engines": { - "node": ">=18.0" + "node": ">=18.20.0" } }