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

feat: make the brotli-size dependency optional #9

Merged
merged 1 commit into from
May 14, 2019

Conversation

jbailey4
Copy link
Contributor

Closes #8

@jbailey4 jbailey4 force-pushed the feature/optional-brotli branch from b3e0082 to 02320a7 Compare May 11, 2019 14:10
@jbailey4 jbailey4 marked this pull request as ready for review May 11, 2019 14:11
Copy link
Member

@simonihmig simonihmig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! Some little things to be fixed...

package.json Show resolved Hide resolved
brotli = require('brotli-size');
console.log(brotli);
} catch (error) {
console.log(error);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove all console.log output.

console.log(brotli);
} catch (error) {
console.log(error);
throw new Error(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this pkg to dependencies and throw a SilentError instead, which will have some better UX (no stack trace): https://github.com/ember-cli/silent-error

README.md Outdated
@@ -15,6 +15,13 @@ ember install ember-cli-bundlesize

Make sure to `git add` the added `config/bundlesize.js` file!

#### Optional dependency

If you're app uses brotli compression and the `brotli` option is set in your configuration (i.e `compression: 'brotli'`), you must install the optional dependency: `brotli-size`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you're app uses brotli compression and the `brotli` option is set in your configuration (i.e `compression: 'brotli'`), you must install the optional dependency: `brotli-size`.
If your app uses Brotli compression and the `brotli` option is set in your configuration (i.e `compression: 'brotli'`), you must install the optional dependency: `brotli-size`.

@jbailey4 jbailey4 force-pushed the feature/optional-brotli branch 2 times, most recently from 727c749 to d0872f8 Compare May 13, 2019 22:53
@jbailey4 jbailey4 force-pushed the feature/optional-brotli branch from d0872f8 to d24d80c Compare May 13, 2019 22:56
@jbailey4
Copy link
Contributor Author

@simonihmig Addressed the feedback and build is now passing. Ready for another review!

Copy link
Member

@simonihmig simonihmig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

@simonihmig simonihmig merged commit 2b89653 into kaliber5:master May 14, 2019
@simonihmig
Copy link
Member

Published as 0.2.0! 🎉

@jbailey4 jbailey4 deleted the feature/optional-brotli branch May 14, 2019 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usage for apps not using Brotli compression
2 participants