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

Adding json out for 'ember asset-sizes' #6425

Merged
merged 1 commit into from Nov 10, 2016

Conversation

Projects
None yet
4 participants
@kiwiupover
Contributor

kiwiupover commented Nov 10, 2016

This is simply JSON.stringify the result of AssetPrinterSize.prototype.makeAssetSizesObject
We could make the json object a little more helpful. Thoughts?

ember asset-sizes --json

Will produce something like this:

{"files":[{"name":"dist/assets/dummy.css","size":114,"gzipSize":109,"showGzipped":true},{"name":"dist/assets/dummy.js","size":31531,"gzipSize":5381,"showGzipped":true},{"name":"dist/assets/tests.js","size":33828,"gzipSize":3818,"showGzipped":true},{"name":"dist/assets/vendor.css","size":0,"gzipSize":20,"showGzipped":false},{"name":"dist/assets/vendor.js","size":3738032,"gzipSize":848035,"showGzipped":true}]}
Adding json out for 'ember asset-sizes'
```sh
ember asset-sizes --json
```

Will produce something like this
```json
{"files":[{"name":"dist/assets/dummy.css","size":114,"gzipSize":109,"showGzipped":true},{"name":"dist/assets/dummy.js","size":31531,"gzipSize":5381,"showGzipped":true},{"name":"dist/assets/tests.js","size":33828,"gzipSize":3818,"showGzipped":true},{"name":"dist/assets/vendor.css","size":0,"gzipSize":20,"showGzipped":false},{"name":"dist/assets/vendor.js","size":3738032,"gzipSize":848035,"showGzipped":true}]}
```
@kiwiupover

This comment has been minimized.

Show comment
Hide comment
@kiwiupover
Contributor

kiwiupover commented Nov 10, 2016

@rwjblue

This comment has been minimized.

Show comment
Hide comment
@rwjblue

rwjblue Nov 10, 2016

Contributor

@homu r+

Contributor

rwjblue commented Nov 10, 2016

@homu r+

@homu

This comment has been minimized.

Show comment
Hide comment
@homu

homu Nov 10, 2016

Contributor

📌 Commit cfd70ca has been approved by rwjblue

Contributor

homu commented Nov 10, 2016

📌 Commit cfd70ca has been approved by rwjblue

@homu

This comment has been minimized.

Show comment
Hide comment
@homu

homu Nov 10, 2016

Contributor

⚡️ Test exempted - status

Contributor

homu commented Nov 10, 2016

⚡️ Test exempted - status

@homu homu merged commit cfd70ca into ember-cli:master Nov 10, 2016

4 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.4%) to 92.531%
Details
homu Test exempted
Details

homu added a commit that referenced this pull request Nov 10, 2016

Auto merge of #6425 - kiwiupover:kiwi-asset-sizes-json, r=rwjblue
Adding json out for 'ember asset-sizes'

This is simply `JSON.stringify` the result of `AssetPrinterSize.prototype.makeAssetSizesObject`
We could make the json object a little more helpful. Thoughts?

```sh
ember asset-sizes --json
```

Will produce something like this:
```json
{"files":[{"name":"dist/assets/dummy.css","size":114,"gzipSize":109,"showGzipped":true},{"name":"dist/assets/dummy.js","size":31531,"gzipSize":5381,"showGzipped":true},{"name":"dist/assets/tests.js","size":33828,"gzipSize":3818,"showGzipped":true},{"name":"dist/assets/vendor.css","size":0,"gzipSize":20,"showGzipped":false},{"name":"dist/assets/vendor.js","size":3738032,"gzipSize":848035,"showGzipped":true}]}
```
@rwjblue

This comment has been minimized.

Show comment
Hide comment
@rwjblue

rwjblue Nov 10, 2016

Contributor

Thanks @kiwiupover!

Contributor

rwjblue commented Nov 10, 2016

Thanks @kiwiupover!

@Turbo87 Turbo87 added this to the v2.11.0 milestone Dec 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment