1.0.2 • Published 3 years ago

@livelink/fitster v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Fitster

Fits rich text proportionally to an element with intelligent text wrapping.

Installation

yarn add @livelink/fitster

Usage

Fitster leverages JavaScript's native module system (known as ESM), so can be used with your favourite front-end build tool.

import Fitster from '@livelink/fitster';

const fitster = new Fitster(document.querySelector('.my-element'));

fitster.fitTo(400, 300);

console.log(fitster.scale);

Before

Before Fitster

After

Before Fitster

See example on CodePen.

Tests

To run the Jest test suite, just run:

yarn test

The test suite will automatically be run by GitHub actions on a push or pull request.

Quality

Releases

Releases are automatically handled by GitHub Actions. Just set the correct semantic version number in package.json, commit and push changes, create a tag e.g. v0.9.8, push the new tag with git push --tags, and the rest will happen automatically.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/livelink/fitster. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The library is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Fitster project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

1.0.2

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.9.3

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago