npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@paypal/messaging-components

v1.64.12

Published

PayPal messaging library for integrating PayPal Credit messaging on merchant websites

Downloads

482

Readme

PayPal Credit Messaging


Compare Snapshots dependencies Status devDependencies Status

A messaging component allowing easy integration of PayPal Credit Messages onto your site.

Dev Docs

See developer.paypal.com/docs/business/pay-later/integrate/


Development

Please feel free to follow the Contribution Guidelines to contribute to this repository. PRs are welcome, but for major changes please raise an issue first.

Quick Setup

Set up your env:

npm install

Run tests:

npm test

Run in dev mode:

npm start

Creating a Bundle

npm run build

Options

  • -v - version, optional
  • -e - environment, one of production, sandbox or stage
  • -m - module, optional, one of library, components, or render
  • -t - tag, optional, name of the stage tag
  • -s - testEnv, optional, link to a test environment

The command you'll most likely need to use is

npm run build -- -t stage-tag-name -s test-environment-link

Scripts

  • build

  • build:<env> where <env> is stage, sandbox, or production

    • runs webpack with NODE_ENV=<env>
  • build:analyze

  • build:demo

    • runs webpack with env.demo set
  • dev

    • runs webpack-dev-server with TARGET=sdk, NODE_ENV=local, STAGE_TAG=local
  • dev:<target> where <target> is standalone, modal, or lander

    • runs webpack-dev-server with TARGET=<target>, NODE_ENV=local, STAGE_TAG=local
    • note: modal uses TARGET=standalone-modal
  • dev:<env> where <env> is stage, sandbox, or production

    • runs webpack-dev-server with TARGET=standalone and NODE_ENV=<env>
  • lint

    • checks our codebase for style issues
  • preinstall

    • runs automatically on npm install and removes node_modules/
  • start

    • runs npm run dev
  • test

    • runs all unit tests
  • test:<type> where <type> is func, func:nosnaps or func:ciupdate

    • func runs all snapshot functional tests
    • func:nosnaps runs all non-snapshot functional tests
    • func:ciupdate updates all snapshots generated by functional tests

Testing

Functional

  1. Run npm run dev:ci in one command line instance
  2. In a second window run the below command, which runs tests for a specific integrationType
    • integrationType is one of: api, sdk, standalone, or webpage
CONFIG_PATH={locale}/{account} npm run test:func:snapshots -- --testPathPattern {integrationType}

Example

CONFIG_PATH=US/DEV_US_MULTI npm run test:func:snapshots -- --testPathPattern sdk

Alternatively, you can remove -- --testPathPattern {integrationType} and just run the following to run tests on an account for all integration types.

CONFIG_PATH={locale}/{account} npm run test:func:snapshots

Stage

For PayPal Internal Testing Only:

To test against PayPal's standard stage url, ensure that the demo page contains the following script, then run npm run dev:stage:

//Change the value of the url and add the script to the demo page (i.e. standalone.html)
<script>window.__TEST_ENV__ = "https://www.{PAYPAL_STAGE_URL_HERE}.com"</script>

If you are looking to run against an alternative environment, set the window.__TEST_ENV__ global to override the environment. Please note, this is only available in development environments.

//Change the value of the test environment
<script>window.__TEST_ENV__ = "https://www.te-test-env.com"</script>

Releasing

This package is published weekly, Every Wednesday. Please view our Changelog to stay updated with bug fixes and new features.