https://github.com/nightwatchjs/nightwatch-docs
Source for https://nightwatchjs.org website
https://github.com/nightwatchjs/nightwatch-docs
hacktoberfest nightwatch nightwatchjs
Last synced: about 2 months ago
JSON representation
Source for https://nightwatchjs.org website
- Host: GitHub
- URL: https://github.com/nightwatchjs/nightwatch-docs
- Owner: nightwatchjs
- License: mit
- Created: 2015-03-31T20:33:05.000Z (about 10 years ago)
- Default Branch: versions/3.0
- Last Pushed: 2025-02-12T19:51:27.000Z (5 months ago)
- Last Synced: 2025-05-07T22:04:29.209Z (about 2 months ago)
- Topics: hacktoberfest, nightwatch, nightwatchjs
- Language: EJS
- Homepage: https://nightwatchjs.org
- Size: 9.89 MB
- Stars: 99
- Watchers: 17
- Forks: 219
- Open Issues: 116
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Nightwatch.js Documentation
Documentation sources for [nightwatchjs.org](http://nightwatchjs.org) website.
[](https://www.npmjs.com/package/nightwatch)
[](https://github.com/nightwatchjs/nightwatch/actions/workflows/build-node.yaml)
[](https://codecov.io/gh/nightwatchjs/nightwatch)
[](https://www.npmjs.com/package/nightwatch)
[![Discord][discord-badge]][discord]
[](https://twitter.com/nightwatchjs)
![]()
#### [Homepage](https://nightwatchjs.org) • [Developer Guide](https://nightwatchjs.org/guide) • [API Reference](https://nightwatchjs.org/api) • [About](https://nightwatchjs.org/about) • [Blog](https://nightwatchjs.org/blog)
***
## Overview
The website is built with **PostDoc** (a static site generator built with Vite and EJS). It supports Markdown, EJS, and front matter. It comes with a dev server with Hot module replacement (HMR).
The content is written in Markdown and it is located in the `docs` folder. The individual API command pages are generated from the Nightwatch source code. based on the JSDoc comments.
### Run the website locally
First, simply clone the repository and install the dependencies.
```bash
git clone https://github.com/nightwatchjs/nightwatch-docs.git
npm install
```### Configuration
Since the API documentation is generated directly from source code, you need to have the Nightwatch source code cloned locally.
#### Step 1: Clone the Nightwatch repository
```bash
git clone https://github.com/nightwatchjs/nightwatch.git
npm install
```#### Step 2: Configure the path to the Nightwatch repository
Next, you have specify the path to where the api commands are in the `postdoc.config.js` file. You can also set the `API_DOCS_FOLDER` environment variable.
```js
// postdoc.config.js
export default {
apidocs: {
source: '/path/to/nightwatch/lib/api/'
}
```You can also disable the API docs generation by setting the `apidocs` property to `false` in the `postdoc.config.js` file:
```js
// postdoc.config.js
export default {
apidocs: false
}
```### Run the website dev server
```bash
npm start
```The website will be available at `http://127.0.0.1:5173/`.
### PostDoc CLI
To view the available options, run:
```bash
npx postdoc --help
```#### Automatically open the website in the browser
```bash
npm start -- --open [chrome|firefox|edge|safari]
```## Build
To build the website, run:
```bash
npm run build
```The generated files will be in the `out` folder.
Quickly serve the generated files with:
```bash
npx postdoc preview
```## License
MIT[discord-badge]: https://img.shields.io/discord/618399631038218240.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square
[discord]: https://discord.gg/SN8Da2X