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

@caldera-labs/caldera-pay-js

v0.0.5

Published

Caldera Pay JavaScript client

Downloads

5

Readme

Caldera Pay JavaScript Client

This library's boilerplate is DimiMikadze/create-react-library

Requirements

A WordPress site with:

  • WordPress 4.9.6 +
  • PHP 7.0 +
  • Caldera Pay WordPress Client Plugin ** Currently only exists on CalderaForms.com caldera-pay branch, will be externalized soon
  • Easy Digital Downloads
  • Caldera Forms

Install

  • Install using npm: npm i caldera-labs/caldera-pay-js

  • Install with yarn:

yarn add caldera-labs/caldera-pay-js

Usage

There is a factory function to load app.

import {factory} from '@caldera-labs/caldera-pay-js';
import domReady from '@wordpress/dom-ready';

domReady( () => {
	factory({},'caldera-pay-app');
} );

This assumes an HTML markup like this:

<div class="caldera-pay">
    <div class="container">
       <div class="row">
         <div class="col-sm-12 col-lg-6" id="caldera-pay-left"></div>
         <div class="col-sm-12 col-lg-6" id="caldera-pay-right"></div>
       </div>
       <div id="caldera-pay-app"></div>
     </div>
</div>

Or you can use the component.

import React from 'react';
import './App.css';
import {
	CalderaPay, //main component
	apiSettingsFactory, // main settings
	userSettingsFactory, //user settings
	ApiClient, // Client for all API requests
	qualpayEmbeddedFields, //manages loading qualpay hosted fields
}from '@caldera-labs/caldera-pay-js';

//URL for the WordPress REST API
const apiRootUrl = 'https://calderaformscom.lndo.site/wp-json';
const settings=  apiSettingsFactory({
    //overides for settings
}, apiRootUrl );
const userSettings = userSettingsFactory(apiRootUrl);

const App = () => (
	<CalderaPay
		userSettings={userSettings}
		settings={settings}
		leftTopDomNode={document.getElementById('left-top')}
        rightTopDomNode={document.getElementById('right-top')}
	/>
);

export default App;

Development

Clone repo

git clone https://github.com/DimiMikadze/create-react-library.git

Install dependencies

npm install or yarn install

Start development server

npm start or yarn start

Runs the demo app in development mode. Open http://localhost:3000 to view it in the browser.

Library files

All library files are located inside src/lib

Demo app

Is located inside src/demo directory, this is the demo of the library, and useful for development

Testing

yarn run test

Build library

yarn run build

Produces production version of library under the build folder.

Publish library

Must be logged in as project maintainer via npm cli

Prepare Release

  • Patch release:

    • yarn release
  • Minor release:

    • yarn release:minor
  • Major release:

    • yarn release:major

Publish To NPM

npm publish