ramspx
v0.0.1
Published
Tiny importable wrapper for the RAMs Product Experience runtime.
Readme
RAMsPX
Importable wrapper for the RAMs Product Experience runtime (/rams-px-sdk.js). It loads the script from your deployed console and re-exports the runtime helpers.
Install
npm install ramspx
# or pnpm add ramspxUse
import RAMsPX from 'ramspx';
await RAMsPX.init({
host: 'https://px.yourco.com', // your console/API origin
apiKey: 'YOUR_API_AUTH_TOKEN',
userId: 'user-123',
page: window.location.pathname,
// sdkUrl: 'https://px.yourco.com/rams-px-sdk/v1.js' // optional override (versioned for cache-busting)
});
// SPA route change
await RAMsPX.refresh();clear() removes injected UI, getManifest() returns the last manifest. The package assumes a browser environment; call init on the client.
Build for publish
cd packages/rams-px
pnpm install
pnpm build
npm publish --access public