Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mozilla-payments-client

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mozilla-payments-client

Modal window JS client for mozilla/payments

  • 0.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

Build Status npm version devDependency Status

Sauce Test Status

Note: Sauce Labs tests are only run on PRs from the main repo or commits to master.

Payments Client

This is a JS client for making payments via mozilla payments.

Installation

npm install --save mozilla-payments-client

Development

You can run a lightweight server to host the bundled payments client which is useful for testing as a script on another site (such as the payments example site). This serves a distribution bundle but also re-builds the bundle any time a file changes.

Start the server like this:

grunt serve

Proxying with Charles

The example site uses a bundled version of the client library by default so one way to try out your edits on the example site is to re-route bundle requests to your locally served source code bundle using Charles Proxy.

To do this import the charles rewrite config (see the Charles directory) into the rewrite panel.

Manually swapping in a development bundle

Without Charles, you can run this command each time you change some code to keep the payments example site up to date:

grunt build && cp dist/payments-client.js /path/to/payments-example/public/lib/js/

Natually, you'd release and bump the example's client dependency to make your changes final.

Tests

To run the tests locally run: grunt test. This will run the unit tests against Firefox.

Cross-browser testing

The tests are run only on Firefox when a PR is submitted. When that code is landed on master, Travis will run the tests on Sauce Labs.

Running Sauce Labs on a PR [Team Only]

If you're a member of the payments team and you want to get Sauce Labs coverage for a PR - push the branch to the main mozilla/payments-client repo and make a PR from that.

Running the tests on SauceLabs locally

First Sign-up for a Sauce Labs 'Open Sauce' account to get your keys.

Then you'll need to export the SauceLabs username and access key as env vars:

export SAUCE_USERNAME=<YOUR_OPEN_SAUCE_USERNAME>
export SAUCE_ACCESS_KEY=<YOUR_ACCESS_KEY>

Then you should find you can run: grunt karma:sauce and run all the tests on SauceLabs.

Cutting a release

With all the changes you want already landed in master - here's the steps for cutting a new release:

  • Bump the version in package.json.
  • Commit it to master
  • Go to the releases page on github and hit "Draft a new release"
  • Use <VERSION> for both the tag and the release title. (The tag shouldn't already exist)
  • Add what's changed.
  • Hit "publish release" and the current rev of master will be tagged and the package will be pushed to npm automatically.

Keywords

FAQs

Package last updated on 28 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc