Skip to content
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

Moderate refactor, add unit tests, fix several bugs, create module configuration #7

Closed
wants to merge 2 commits into from

Conversation

Vectorrent
Copy link

  1. Added a configuration object to the Grammarify instance, so that we may update disconnected/shorthand lists without needing to update the package itself. Documented this object in the readme.
  2. Added an option to disable spellchecking. Spellcheck is automatically disabled while running in a browser. Thus, this package is no longer Node-specific.
  3. Addresses some faults in the ellipsis handling. Documented the changes inline.
  4. Created a suite of very basic unit tests in Jest, to test each of one the features listed in the readme. Spellcheck doesn't work in Jest, but it does in Node, as it always has.
  5. Converted the deprecated array.substr() method to array.substring().
  6. Converted all vars to let and const.

This was more of a challenge than I expected it to be! This project is a little confusing, but very much appreciated. Thanks for keeping it maintained for us!

Ink

dependabot bot and others added 2 commits March 29, 2022 07:36
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
@Vectorrent
Copy link
Author

Aaand... I just noticed that ES6 import isn't working. Give me a day or two to get that one fixed.

@Vectorrent
Copy link
Author

False alarm! You can merge this, if you want it. It was just a caching issue.

The ES6 syntax is:

import Grammarify from 'grammarify'
const grammarify = new Grammarify({opts})

@Vectorrent
Copy link
Author

Still not working in Node, as an ES6 module. The browser compiler was smart enough to fix the other issues.

Going to close this PR for now. I'll open another one if I can get this stuff working better.

@Vectorrent Vectorrent closed this Apr 23, 2022
@reZach
Copy link
Owner

reZach commented Jul 27, 2022

Thanks @LuciferianInk for your partial work here. I've pushed a release with these changes.

Some of the methods in here, ie unstretchify and fixStretching definitely are a bit to unwind! Thanks for working through and your input on this project.

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.

None yet

2 participants