mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-04-18 01:34:17 -05:00
fixes
This commit is contained in:
parent
d73f81219a
commit
831f1916e6
4 changed files with 10 additions and 6 deletions
|
@ -16,7 +16,7 @@
|
|||
<a href="https://penpot.app/"><b>Penpot Website</b></a> •
|
||||
<a href="https://community.penpot.app/t/figma-to-penpot-export-plugin/5554"><b>Export Figma to Penpot (Penpot community)</b></a> •
|
||||
<a href="https://community.penpot.app/"><b>Penpot Community</b></a> •
|
||||
<a href="https://www.figma.com/community/plugin/1219369440655168734/penpot-exporter"><b>Plugin in Figma community</b></a>
|
||||
<a href="https://www.figma.com/community/plugin/1219369440655168734/penpot-exporter"><b>Plugin in Figma community</b></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
|
@ -96,6 +96,9 @@ then selecting "Download ZIP". Extract the ZIP file to a location on your comput
|
|||
3. Once you are in the correct folder, you can run the `npm install` command to install the
|
||||
dependencies, and then the `npm run build` command to build the plugin.
|
||||
|
||||
#### Building for production:
|
||||
Follow the same steps as above, but instead of running `npm run build`, run `npm run build:prod`.
|
||||
|
||||
### Add to Figma
|
||||
|
||||
`Figma menu` > `Plugins` > `Development` > `Import plugin from manifest…` To add the plugin to
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
"description": "Penpot exporter",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "concurrently -n widget,iframe 'npm:build:main' 'npm:build:ui'",
|
||||
"build": "concurrently -n widget,iframe 'npm:build:main' 'npm:build:ui -- --mode development'",
|
||||
"build:prod": "concurrently -n widget,iframe 'npm:build:main' 'npm:build:ui -- --mode production'",
|
||||
"build:main": "esbuild plugin-src/code.ts --bundle --outfile=dist/code.js --target=es2016 --minify",
|
||||
"build:ui": "vite build",
|
||||
"build:watch": "concurrently -n widget,iframe 'npm:build:main -- --watch' 'npm:build:ui -- --watch'",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import mixpanel from 'mixpanel-figma';
|
||||
|
||||
export const track = (name: string, opts = {}) => {
|
||||
if (import.meta.env.VITE_MIXPANEL_TOKEN) {
|
||||
if (import.meta.env.VITE_MIXPANEL_TOKEN && import.meta.env.PROD) {
|
||||
opts = {
|
||||
...opts,
|
||||
'Plugin Version': APP_VERSION
|
||||
|
@ -11,7 +11,7 @@ export const track = (name: string, opts = {}) => {
|
|||
};
|
||||
|
||||
export const identify = ({ userId }: { userId: string }) => {
|
||||
if (import.meta.env.VITE_MIXPANEL_TOKEN) {
|
||||
if (import.meta.env.VITE_MIXPANEL_TOKEN && import.meta.env.PROD) {
|
||||
mixpanel.identify(userId);
|
||||
|
||||
mixpanel.people.set({
|
||||
|
@ -22,7 +22,7 @@ export const identify = ({ userId }: { userId: string }) => {
|
|||
};
|
||||
|
||||
export const initializeMixpanel = () => {
|
||||
if (import.meta.env.VITE_MIXPANEL_TOKEN) {
|
||||
if (import.meta.env.VITE_MIXPANEL_TOKEN && import.meta.env.PROD) {
|
||||
mixpanel.init(import.meta.env.VITE_MIXPANEL_TOKEN, {
|
||||
disable_cookie: true,
|
||||
disable_persistence: true,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as Sentry from '@sentry/react';
|
||||
|
||||
export const initializeSentry = () => {
|
||||
if (import.meta.env.VITE_SENTY_DSN) {
|
||||
if (import.meta.env.VITE_SENTY_DSN && import.meta.env.PROD) {
|
||||
Sentry.init({
|
||||
dsn: import.meta.env.VITE_SENTRY_DSN,
|
||||
integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()],
|
||||
|
|
Loading…
Add table
Reference in a new issue