feat: sdks and docs (#239)
* init * fix * update docs * bump: all sdks * rename types test
This commit is contained in:
committed by
GitHub
parent
790801b728
commit
83e223a496
@@ -1,5 +1,6 @@
|
||||
---
|
||||
import type { OpenPanelMethodNames, OpenPanelOptions } from '@openpanel/web';
|
||||
import { getInitSnippet } from '@openpanel/web';
|
||||
|
||||
type Props = Omit<OpenPanelOptions, 'filter'> & {
|
||||
profileId?: string;
|
||||
@@ -32,7 +33,7 @@ const methods: { name: OpenPanelMethodNames; value: unknown }[] = [
|
||||
value: {
|
||||
...options,
|
||||
sdk: 'astro',
|
||||
sdkVersion: '1.0.2',
|
||||
sdkVersion: '1.0.3',
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -51,7 +52,7 @@ if (globalProperties) {
|
||||
});
|
||||
}
|
||||
|
||||
const scriptContent = `window.op = window.op || function(...args) {(window.op.q = window.op.q || []).push(args)};
|
||||
const scriptContent = `${getInitSnippet()}
|
||||
${methods
|
||||
.map((method) => {
|
||||
return `window.op('${method.name}', ${stringify(method.value)});`;
|
||||
|
||||
Reference in New Issue
Block a user