Skip to content

Conversation

@blueprin4
Copy link

What kind of change does this PR introduce?

Docs update

What is the current behavior?

The current documentation incorrectly states the naming convention for hook files and doesn't specify their location. There's also a typo in one of the examples.

What is the new behavior?

This PR updates the documentation to:

  1. Correct the file naming convention from users.js to users_processDocument.js.
  2. Specify that the hook file should be in the same directory as the firestore2json.js script.
  3. Fix a typo in the first example (change recordCounter to recordCounters).

These changes align the documentation with the actual script behavior:

if (fs.existsSync(`./${args[0]}_processDocument.js`)) {
    processDocument = require(`./${args[0]}_processDocument.js`);
}

The main changes are:

1. Updated the file naming convention from `users.js` to `users_processDocument.js`.
2. Specified that the hook file should be in the same directory as the `firestore2json.js` script.
3. Fixed a typo in the first example (changed `recordCounter` to `recordCounters`).

These changes should help prevent confusion and ensure that users create their hook files with the correct name and in the right location. The script is looking for a hook file with a specific naming convention:
```
if (fs.existsSync(`./${args[0]}_processDocument.js`)) {
    processDocument = require(`./${args[0]}_processDocument.js`);
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant