paygreenjs
    Preparing search index...

    paygreenjs

    PaygreenJS

    A public library developped by Paygreen to manage hosted fields on your website.

    Available here

    vite build now generates Lemonway-first artifacts and duplicates legacy Paygreen artifacts for production compatibility.

    npm run build
    

    Generated files in dist/:

    • lemonway.min.js
    • lemonway.min.css
    • lemonway.d.ts
    • types/*.d.ts (declaration modules referenced by lemonway.d.ts)
    • paygreen.min.js (legacy alias)
    • paygreen.min.css (legacy alias)
    • paygreen.d.ts (legacy alias)

    The bundle keeps runtime backward compatibility:

    • window.paygreenjs (legacy, still supported)
    • window.lemonwayjs (new preferred alias)

    Both point to the same SDK instance.

    Source maps are only generated when:

    • PG_ENV=DEV

    For any other PG_ENV, .map files are not produced.

    Public types for integrators are defined in src/public-api.ts and generated during vite build as dist/lemonway.d.ts + dist/paygreen.d.ts.

    Types are synced into @lemonway/lemonway-js for npm install + IDE autocomplete.

    After a release:

    1. Tag pgjs (e.g. v1.14.25) and ensure build artifacts include both lemonway.d.ts and paygreen.d.ts.
    2. In lemonway-js-loader: set pgjs-types-ref, run npm run sync:types /path/to/pgjs, commit types, publish @lemonway/lemonway-js.

    Integrators can use:

    import { loadLemonwayPayment, type LemonwayPayment } from '@lemonway/lemonway-js';