@mtucourses/thumbor
Version:
👍 a URL builder for Thumbor
43 lines (28 loc) • 931 B
Markdown
[](https://codecov.io/gh/Michigan-Tech-Courses/thumbor)
```ts
import {Thumbor} from '@mtucourses/thumbor';
const thumbor = new Thumbor({url: 'https://thumbor.example.com', key: 'a-sample-key'});
const url = thumbor
.setPath('https://images.unsplash.com/photo-1611581893305-ec40e53882fc')
.smartCrop(true)
.resize(500, 0)
.buildURL();
```
```bash
yarn install
yarn build:watch
yarn test
yarn test:watch
```
To publish a new package version, run `npm version [patch|minor|major]` and then `git push && git push --tags` on the master branch.
Adapted from [this package](https://github.com/PolicyMic/thumbor/blob/master/index.js).