Skip to content

update Hooks readme #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

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