{"id":19900075,"url":"https://github.com/m-lab/measure-app","last_synced_at":"2025-05-02T22:32:10.432Z","repository":{"id":32717852,"uuid":"36307569","full_name":"m-lab/measure-app","owner":"m-lab","description":"Code for the M-Lab Measure App","archived":false,"fork":false,"pushed_at":"2024-05-29T07:40:00.000Z","size":9730,"stargazers_count":10,"open_issues_count":12,"forks_count":4,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-20T19:22:23.419Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://chrome.google.com/webstore/detail/m-lab-measure/leijmacehibmiomcnpaolboihcdepokh","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-26T16:05:44.000Z","updated_at":"2023-12-20T13:17:23.000Z","dependencies_parsed_at":"2024-11-06T16:48:44.008Z","dependency_job_id":null,"html_url":"https://github.com/m-lab/measure-app","commit_stats":{"total_commits":127,"total_committers":6,"mean_commits":"21.166666666666668","dds":0.6299212598425197,"last_synced_commit":"ad934a21e7c08500addfa348afe2a2c550e1bb67"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fmeasure-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fmeasure-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fmeasure-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fmeasure-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-lab","download_url":"https://codeload.github.com/m-lab/measure-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250753112,"owners_count":21481529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T20:11:04.982Z","updated_at":"2025-05-02T22:32:10.414Z","avatar_url":"https://github.com/m-lab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# measure-app\n\n## Development\n\n### Prerequisites\n\n* [Node v0.12+](https://nodejs.org)\n  * Preferably via [nvm](https://github.com/creationix/nvm), e.g. `nvm use [version]`\n* [Cordova](https://www.npmjs.com/package/cordova), [Gulp](http://gulpjs.com), and [CCA](https://github.com/MobileChromeApps/mobile-chrome-apps) toolchain: `npm install -g cordova cca gulp-cli`\n* [Yarn](https://yarnpkg.com/): `npm install -g yarn`\n* [Android SDK](http://developer.android.com/sdk/installing/index.html?pkg=tools)\n  * To completely install the SDK, you must:\n  * run `[sdk directory]/tools/android sdk` and setup the [tools](http://developer.android.com/sdk/installing/adding-packages.html)\n  * Minimal packages that must be installed:\n    * Android SDK Tools\n    * Android Platform-tools\n    * Android SDK Build-tools **22.0.1**\n    * Android 5.1.1 (API 22) \u003e SDK Platform (this may also require you to install higher SDK Platform versions)\n    * Extras \u003e Android Support Repository\n    * Extras \u003e Android Support Library\n\n  * Optionally, install a system image for the emulator.\n\n### Getting Started\n\nAfter installing prerequisites, run:\n\n```bash\n# Install dependencies and set up build environment\nyarn\n```\n\n## Mobile App\n\n### Building as an Android App\n\nTo build as an Android app:\n\n```bash\n# Setup app manifest, bower dependencies, CSS, and translations\ngulp app\n\n# Package\ncca prepare android\ncca build android\n```\n\n### Running\n\n```bash\n# Run on emulator\ncca run android --emulator\n\n# or run on a connected device\ncca run android --device\n```\n\nOnce running, you can open Chrome at `chrome://inspect` to get live debugging using Developer Tools.\n\n#### Packaging\n\n```bash\ncca build android --release\n```\n\n## Chrome Extension\n\n### Building as a Chrome Extension\n\n**NB:** The app can be loaded as a Chrome App (standalone) or Chrome extension (browser-embedded).\n\nOnly run this command if you want to build the extension version.  Otherwise skip to [Running](#Running).\n\n```bash\ngulp extension\n```\n\n#### Running in Chrome\n\nIn Chrome, add the \"unpacked extension\":\n\n`chrome://extensions`\n\n* Ensure `Developer mode` is checked.\n* Click the `Load unpacked extension...` button and select the `www` subdirectory\n\nNow you should see the Measure.app icon on the toolbar.\n\n#### Packaging as a .crx\n\nTo create a `.crx` file, open:\n\n`chrome://extensions`\n\nClick the `Packed extension...` button and select the `platforms/browser/www` subdirectory.\n\nThis will create a `www.crx` and associated private key `www.pem`.  You'll need both to distribute this extension to testers.\n\n#### Packaging for Distribution in the Chrome Store\n\nTo publish as a Chrome App, you'll need to:\n\n* Edit the version in `www/manifest.json` to be higher than the previous version, Note: 0.15 \u003c 0.16 but 0.15 \u003e 0.2\n* Zip up the `www` folder\n* Log into the Chrome Developers Console\n* Edit the existing application\n* Upload new version, and save to publish the app\n* Publishing takes ~15-30 minutes to fully publish an update\n* Force update the extension in `chrome://extensions` to pull the update\n\n## Translations\n\nUser interface strings are tagged in the source code using the [getttext](https://en.wikipedia.org/wiki/Gettext) system. Strings presented in the application's user interface are coded with _gettext_ function calls, for example:\n\n```html\n# Examples from an HTML template:\n\n\u003cion-view view-title=\"{{ 'About' | translate }}\"\u003e\n\u003cspan translate\u003eAbout M-Lab Measure App\u003c/span\u003e\n```\n\n```javascript\n# Examples from a JS file:\n\n.controller(\"manualTranslationStrings\", function (gettext) {\n    var translationStrings = {\n        \"Time\": gettext(\"Time\"),\n        \"Service Provider\": gettext(\"Service Provider\"),\n        \"Your Location\": gettext(\"Your Location\"),\n\n```\n\nWhen the application is built, all strings properly identified by _gettext_ function calls are automatically parsed into an updated master file of and saved in: **/www/translations/source/application.pot**. All of the strings in the master file are in English.\n\nThis file must then be uploaded to the project's [Transifex account](https://www.transifex.com/otf/mlab-app/mlab_app_translations/). Click the button labelled \"Updating source file\", then notify translators that new strings are available to translate.\n\nWhen translators have completed their work, the 100% complete language files may be downloaded for use, and saved in [/www/translations/lang](www/translations/lang). Subsequent builds of the extension or app will then automatically include the updated language strings or new language string sets.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Fmeasure-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-lab%2Fmeasure-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Fmeasure-app/lists"}