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

change api to allow creating the options through the main class #2

Merged
merged 1 commit into from Apr 15, 2019

Conversation

Projects
None yet
2 participants
@koenpunt
Copy link
Member

koenpunt commented Apr 15, 2019

This would allow generating a url in a more streamlined API;

const imgproxy = new Imgproxy({
  baseUrl: 'https://imgproxy.example.com',
  key: process.env.IMGPROXY_KEY,
  salt: process.env.IMGPROXY_SALT,
  encode: true,
})

// ...

imgproxy
  .builder()
  .resize('fill', 300, 200, 0)
  .gravity(Gravity.north_east)
  .dpr(2)
  .generateUrl('https://example.com/path/to/image.jpg');

@koenpunt koenpunt force-pushed the simplify branch 5 times, most recently from ea88ab8 to e4e0c8c Apr 15, 2019

@koenpunt koenpunt force-pushed the simplify branch from e4e0c8c to fec7c73 Apr 15, 2019

@remq

remq approved these changes Apr 15, 2019

@koenpunt koenpunt marked this pull request as ready for review Apr 15, 2019

@koenpunt koenpunt merged commit bcafffa into master Apr 15, 2019

@koenpunt koenpunt deleted the simplify branch Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.