Package Exports
- @pubtech-ai/stub
- @pubtech-ai/stub/lib/stub.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@pubtech-ai/stub) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@pubtech-ai/stub
Cmp API Stub code. Maybe included in commonjs loader or dropped directly on the page.
Installation
npm
npm install @pubtech-ai/stub
yarn
yarn add @pubtech-ai/stub
Using
include via module loading
import * as cmpstub from '@pubtech-ai/stub';
or
const cmpstub = require('@pubtech-ai/stub');
then execute:
cmpstub();
this should generate the __tcfapi()
window function with the queing functionality.
to drop on a page
git clone https://github.com/InteractiveAdvertisingBureau/pubtech-ai-es.git
cd pubtech-ai-es/modules/stub/
yarn // or npm install
yarn build // or npm run build
Built stub will be output to ./lib
Getting queue of commands
const queue = __tcfapi();
console.log(queue); // [ ['command', 2, callback], ...]