Thank you for getting involved in Medium Zoom!
This module is meant to reproduce the zoom from Medium. We want to provide a great UX (User Experience) with a lightweight vanilla JavaScript solution. Thus, this package must remain focused on this core principle, yet be extended with a composable API.
▸ cypress The end-to-end tests written for Cypress
▸ examples The Medium Zoom featured examples available on CodeSandbox
▸ src The source code of the module
▸ __tests__ The tests for the module API
▸ stories The stories for the Medium Zoom Storybook
▸ website The Medium Zoom website source code
This project follows the conventional changelog guidelines. All commit messages should be formatted using the following scheme:
type(scope): description
Reporting a bug or requesting a feature is always welcome. Feel free to open an issue with the according template which helps you create an effective report.
After discussing in an issue about the need to change the code, you will need to follow these steps:
- Fork the repository
- Clone your fork
- Install the dependencies:
yarn
- For a documentation change:
- Create a branch
docs/what-you-change
- Make the changes
- Run
yarn run format
- Create a branch
- For a bug fix:
- Create a branch
fix/issue-number
- Write a test to reproduce the bug (run
yarn run test
) - Fix the bug in the source code
- Make your test pass the previous bug
- Run
yarn run format
and fix problems if any
- Create a branch
- For a feature:
- Create a branch
feat/name-of-the-feature
- Add the feature to the source code
- Create a story in the storybook showcasing the feature
- Write a test to ensure it's working as expected (run
yarn run test
) - Run
yarn run format
and fix problems if any
- Create a branch
- Create a pull request
We will then review your pull request!
Unit and integration tests with Jest ensure that the API works as documented.
- Run the tests:
yarn run test
- Watch the tests:
yarn run test --watch
- Run the tests with coverage:
yarn run test --coverage
End-to-end tests with Cypress take screenshots of the stories to ensure that the zoom looks as expected.
- Open the Cypress UI:
yarn run test:cypress:open
- Run the Cypress tests:
yarn run test:cypress:run
We rely on release-it to release new versions of this package.
The release flow goes through these steps:
- Run acceptance tests
- Bump the project version in
package.json
based on the commits - Commit the release version
- Create the new Git tag for this release
- Push to GitHub
- Publish to npm
- Make sure you're on the
next
branch - Run
npm run release:next
(do not useyarn
for releasing) - Follow the command-line instructions
- Make sure you're on the
master
branch - Run
npm run release
(do not useyarn
for releasing) - Follow the command-line instructions
Thank you for contributing!