Skip to content

defmethodinc/just-not-sorry

Repository files navigation

Commitizen friendly code style: prettier

Just Not Sorry -- the Chrome extension

Inspired by the writings of Tara Mohr and others, this Chrome Extension for Gmail and Outlook for web (live.com) helps you send more confident emails by warning you when you use words which undermine your message.

The Chrome Extension can be found at https://chrome.google.com/webstore/detail/just-not-sorry-the-gmail/fmegmibednnlgojepmidhlhpjbppmlci?hl=en-US

For more information about Just Not Sorry, go to https://defmethodinc.github.io/just-not-sorry/

Contributing

Requests to add or change warning phrases

The list of warning phrases can be found here.

If you'd like us to add new warning phrases, please create a GitHub issue with your request.

NOTE: All warning phrases must include a link to an article that explains why the phrase could negatively impact someone's message. If available, please also include alternative wording suggestions from the article.

If you're a developer, you're welcome to submit a pull request. Please run the tests before submitting, as they will validate the format of the message.

Development Setup

Prerequisites:

Setup:

  • git clone the repo
  • Run npm install in the project root
  • Run npm run start:chrome to build the extension in watch mode and start a fresh chrome browser session with the extension loaded. Any changes you make to the code will result in the extension being reloaded. You might need to reload the gmail web page for them to show up, though.

You can also load the extension manually in Chrome using the following steps:

  • Run npm run build in the project root to build the extension
  • Follow the instructions on the Chrome docs to load the unpacked extension using the build subdirectory
  • Go to Gmail (or outlook.com) and open a compose window
  • If you make changes to the code, click the Reload link on the chrome://extensions page and then reload your Gmail tab to pick up the changes.
  • Errors will show up in the console

Coding Standards

Prettier is used to enforce code style and eslint is used to check for best practices. Both are enforced automatically at commit time using lint-staged and husky.

Commit Message Conventions

Commit messages are required to follow the AngularJS's commit message convention. This allows us to automatically increment the version numbering of the extension using the SemVer standard and generate release notes. We use the Commitizen library to provide interactive prompts to help generate the commit messages. Once you've run npm install as instructed in the development setup section, Commitizen will be run whenever you execute the git commit command.

Enzyme Tests

Tests are written using enzyme. They can either be run from the command line using:

npm test

To run the tests watch mode, use:

npm run test:watch

To Publish a New Version to Chrome Webstore

This project uses the semantic-release library and GitHub Actions to automate the release process. Once a pull request has been merged into the main branch, a new GitHub release will be created. A zip file containing the updated files for the Chrome web store will be attached.

To publish this release, download the zip file from GitHub. Find the Just Not Sorry extension on the Chrome Developer Dashboard (credentials available to DefMethod developers upon request), upload the zip file, and click the "Publish Item" button.

To publish changes to justnotsorry.com

See the website README.md for more information.

Libraries Used

For production:

For test:

License

Just Not Sorry is Copyright © 2015-23 Def Method, Inc. It is free software, and may be redistributed under the terms specified in the (MIT) LICENSE file.