Skip to content

Commit

Permalink
feat: change global variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
VojtechVidra committed Feb 29, 2024
1 parent 2067b69 commit 68dbe5f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
28 changes: 24 additions & 4 deletions examples/vanilla-js/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,30 @@
/>

<!-- How you would use Flows in your own code -->
<!-- Make sure to lock specific version to avoid braking changes. See docs for more info. -->
<script src="https://unpkg.com/@flows/js@latest/dist/index.global.js"></script>

<script src="index.js"></script>
<!-- Make sure to lock specific version to avoid braking changes. Visit https://flows.sh/docs for more info. -->
<script defer src="https://unpkg.com/@flows/js@latest/dist/index.global.js"></script>
<script>
flows.init({
projectId: "e7d8eb63-7670-4da1-b0e0-d2d3331d108b",
flows: [
{
id: "local-flow",
clickElement: "#start-local",
steps: [
{
targetElement: "#start-local",
title: "Welcome to FlowsJS!",
body: "This is a demo of FlowsJS. Click the button below to continue.",
},
{
title: "This is a modal",
body: "This is a modal. It is an useful way to show larger amounts of information with detailed descriptions. For smaller amounts of information, you can use a tooltip. Click the button below to continue.",
},
],
},
],
})
</script>
</head>
<body>
<div>
Expand Down
2 changes: 1 addition & 1 deletion workspaces/js/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default defineConfig({
entry: ["src/index.ts", "src/core/index.ts"],
clean: true,
format: ["cjs", "esm", "iife"],
globalName: "FlowsJS",
globalName: "flows",
minify: true,
dts: true,
});

0 comments on commit 68dbe5f

Please sign in to comment.