-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add analytics for handoff checklist (#2413)
* feat: add analytics for handoff checklist * fix: coverage plugin bug * fix: add widget analytics * fix: add more data for analytics * fix: snowflake widget bug * fix: snowflake typo
- Loading branch information
1 parent
a04b605
commit 5f6bdb5
Showing
12 changed files
with
1,470 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
packages/widget-figma-dev-handoff-checklist/build-dev-handoff.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const esbuild = require('esbuild'); | ||
require('dotenv').config(); | ||
|
||
async function build() { | ||
// Check if the `--watch` argument is passed in the command line | ||
const isWatchMode = process.argv.includes('--watch'); | ||
|
||
// Create the build context | ||
const ctx = await esbuild.context({ | ||
entryPoints: ['dev-handoff-checklist/code.tsx'], | ||
bundle: true, | ||
outfile: 'dev-handoff-checklist/dist/code.js', | ||
target: 'es6', | ||
define: { | ||
'process.env.SEGMENT_WRITE_KEY': JSON.stringify(btoa(process.env.SEGMENT_WRITE_KEY ?? '')), | ||
}, | ||
}); | ||
|
||
if (isWatchMode) { | ||
// Enable watch mode | ||
await ctx.watch(); | ||
console.log('Watching for changes...'); | ||
} else { | ||
// Perform a single build | ||
await ctx.rebuild(); | ||
console.log('Build completed.'); | ||
await ctx.dispose(); | ||
} | ||
} | ||
|
||
// Execute the build function | ||
build().catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
35 changes: 35 additions & 0 deletions
35
packages/widget-figma-dev-handoff-checklist/build-snowflake-handoff.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const esbuild = require('esbuild'); | ||
require('dotenv').config(); | ||
|
||
async function build() { | ||
// Check if the `--watch` argument is passed in the command line | ||
const isWatchMode = process.argv.includes('--watch'); | ||
|
||
// Create the build context | ||
const ctx = await esbuild.context({ | ||
entryPoints: ['snowflake-handoff-checklist/code.tsx'], | ||
bundle: true, | ||
outfile: 'snowflake-handoff-checklist/dist/code.js', | ||
target: 'es6', | ||
define: { | ||
'process.env.SEGMENT_WRITE_KEY': JSON.stringify(btoa(process.env.SEGMENT_WRITE_KEY ?? '')), | ||
}, | ||
}); | ||
|
||
if (isWatchMode) { | ||
// Enable watch mode | ||
await ctx.watch(); | ||
console.log('Watching for changes...'); | ||
} else { | ||
// Perform a single build | ||
await ctx.rebuild(); | ||
console.log('Build completed.'); | ||
await ctx.dispose(); | ||
} | ||
} | ||
|
||
// Execute the build function | ||
build().catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.