Move the random name word lists into their own file - #11
Merged
Conversation
The adjective and noun lists move from script.js to public/names.js, one word per line and alphabetical, so that adding words is a self-contained change that does not touch any logic and does not collide with other pull requests doing the same. NAME_ANIMALS becomes NAME_NOUNS, since the list is meant to grow past animals. The file header carries the rules for adding a word, including the nine character budget that keeps a generated name inside the twenty character cap the client and server both enforce. names.js joins the service worker shell and the syntax check, and the cache version bumps so the new file is picked up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preparation for the word list contributor issue.
The adjective and noun lists move out of
script.jsintopublic/names.js, one word per line and alphabetical, so adding words is a self-contained change that touches no logic and does not collide with other pull requests doing the same.NAME_ANIMALSbecomesNAME_NOUNS, since the list is meant to grow past animals. The file header carries the rules for adding a word, including the nine character budget that keeps a generated name inside the twenty character cap both the client and the server enforce.names.jsjoins the service worker shell andnpm test, and the cache version bumps so the new file is picked up.No behaviour change: names generate and persist exactly as before.