Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Tag 1.0.0 and publish as an NPM package#30

Merged
martinbalfanz merged 1 commit intomozilla:masterfrom
jankeromnes:npm
Nov 14, 2018
Merged

Tag 1.0.0 and publish as an NPM package#30
martinbalfanz merged 1 commit intomozilla:masterfrom
jankeromnes:npm

Conversation

@jankeromnes
Copy link
Copy Markdown
Contributor

This allows getting the catalog like so:

$ npm install devices.json
$ node
> require('devices.json')

Ideally, we should also automate the S3 and NPM deployments of this catalog, e.g. on every Git tag with Travis CI like so.

@jankeromnes
Copy link
Copy Markdown
Contributor Author

Publishing an NPM package, in addition to our CDN and GitHub deployments, responds to a user request on Twitter: https://twitter.com/alloy/status/1062645363499261952

@alloy
Copy link
Copy Markdown

alloy commented Nov 14, 2018

Ace, thanks @jankeromnes! 🙏

For some context, I’d like to use this list to constrain the markup we render and send over the wire for those cases where we definitively know the screen sizes (and those are also the devices that could do with less bytes over the wire). Having this be a package that I can upgrade as part of our routine dependency upgrades and automatically get new device definitions for free would be great.

@martinbalfanz
Copy link
Copy Markdown
Collaborator

I like the suggestions, esp. automating the deployments to both S3 and NPM. Let's do this!

@alloy I just want to mention that this list is very specific to Firefox' RDM. Therefore, we may add/remove/modify devices on an irregular basis. Also, with our investment into mobile browsers, we will modify the user agents to match Firefox where possible. It seems irrelevant for your use case, but I thought to make you aware 🙂

@martinbalfanz martinbalfanz merged commit 504ab35 into mozilla:master Nov 14, 2018
@jankeromnes jankeromnes deleted the npm branch November 15, 2018 12:43
@alloy
Copy link
Copy Markdown

alloy commented Nov 17, 2018

Ohhh, that’s a good FYI, thanks, because that’s not what I need 😞 I think I’ll have to maintain our own database of user-agent to device size mappings (or regular-expressions to max sizes, eg in case of iPhones which don’t include model info in user-agent).

@jankeromnes Sorry for not realising this earlier, but thanks so much for wanting to assist! 🙏 I hope your effort wasn't for nothing.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants