Multipreffer
- Allows defining a set of prefs per SHIELD branch, and sets them at install and cleans them up upon uninstall.
- Pref values are set on the default branch. User values are preserved.
The prefs to be set should be defined in src/variations.json, following this scheme:
{
"branch 1": { // Name of branch
"weight": 1, // Weight determines relative chance of getting assigned to this branch
"prefs": { // Prefs and values to set upon install
"pref1": "string1",
"pref2": true,
"pref3": 99
}
},
[...]
}
[WIP] Process to develop a multipreffer-based study
TODO: streamline, automate.
- Make a copy of the repo
- Update metadata in
src/manifest.json
andpackage.json
- Update
abort
andbranch_name
prefs - Define branches and target prefs/values in
src/variations.json
npm install
npm run build
npm run test
If the tests pass, should be good to go! Build is in dist/
- upload to the study bug for signing.