Use RequireJS to modularize fxpay and improve tests

RESOLVED FIXED

Status

Marketplace
Payments/Refunds
P5
normal
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: kumar, Assigned: scolville)

Tracking

Avenir
x86
Mac OS X
Points:
---

Details

(Whiteboard: [qa-])

If we add RequireJS to the fxpay JS lib we'll unlock the following possibilities:

- other apps (like Fireplace) can use un-minified fxpay source which will be great for development
- the fxpay test suite can use some really nice isolation patterns. See https://achudnovskij.wordpress.com/2014/09/09/require-js-mock-injection-review-options-and-rfactory-plugin-introduction/
- the fxpay minification process should be more straight forward
- people can run fxpay from the source repository more easily
- the example app can work with un-minified source
Assignee: nobody → kumar.mcmillan
Blocks: 1058271
Whiteboard: [qa-]
Priority: -- → P5
digitarald suggests that we may be able to get node + browser support with a UMD pattern:

http://davidbcalhoun.com/2014/what-is-amd-commonjs-and-umd/

and maybe rewire could be used for mock injection: https://www.npmjs.com/package/rewire-webpack See also: https://github.com/jhnns/rewire
Stuart got this ^5 https://github.com/mozilla/fxpay/pull/102
Assignee: kumar.mcmillan → scolville
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.