Skip to content

Commit

Permalink
Use any config file: backstop.json, backstop.js
Browse files Browse the repository at this point in the history
  • Loading branch information
klodoma committed May 1, 2024
1 parent 752ba64 commit 60c040d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ BackstopJS can create a default configuration file and project scaffolding in yo
backstop init
```

Use `backstop init --js` to initialize the project with a `.js` configuration file.

### Working with Your Config File

By default, BackstopJS places `backstop.json` in the root of your project. And also by default, BackstopJS looks for this file when invoked.
Expand All @@ -112,9 +114,9 @@ Pass a `--config=<configFilePathStr>` argument to test using a different config

**JS based config file**

You may use a javascript based config file to allow comments in your config. Be sure to _export your config object as a node module_.
You may use a javascript based config file to allow the use of comments and more complex configurations. Be sure to _export your config object as a node module_.

Example: Create a backstop.config.js
Example: Create a `backstop.config.js`

```
module.exports = { Same object as backstop.json }
Expand Down

0 comments on commit 60c040d

Please sign in to comment.