diff --git a/packages/components/.env b/packages/components/.env new file mode 100644 index 00000000..317a9dc2 --- /dev/null +++ b/packages/components/.env @@ -0,0 +1,3 @@ +TAMAGUI_TARGET=web +STORYBOOK_DISABLE_TELEMETRY=1 +STORYBOOK_ENABLE_CRASH_REPORTS=0 diff --git a/packages/components/.env.development b/packages/components/.env.development new file mode 100644 index 00000000..317a9dc2 --- /dev/null +++ b/packages/components/.env.development @@ -0,0 +1,3 @@ +TAMAGUI_TARGET=web +STORYBOOK_DISABLE_TELEMETRY=1 +STORYBOOK_ENABLE_CRASH_REPORTS=0 diff --git a/packages/components/.env.production b/packages/components/.env.production new file mode 100644 index 00000000..317a9dc2 --- /dev/null +++ b/packages/components/.env.production @@ -0,0 +1,3 @@ +TAMAGUI_TARGET=web +STORYBOOK_DISABLE_TELEMETRY=1 +STORYBOOK_ENABLE_CRASH_REPORTS=0 diff --git a/packages/components/.gitignore b/packages/components/.gitignore index e9670990..f71e2a9a 100644 --- a/packages/components/.gitignore +++ b/packages/components/.gitignore @@ -3,3 +3,7 @@ dist/ THUMBS_DB node_modules/ types/ + +# local env files +!.env.* +.env*.local diff --git a/packages/components/package.json b/packages/components/package.json index e035fcc6..bf90cb04 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -22,8 +22,8 @@ "lint": "eslint src", "typecheck": "tsc", "storybook": "node ./scripts/storybook.js", - "storybook:dev": "TAMAGUI_TARGET='web' storybook dev -p 3001", - "storybook:build": "TAMAGUI_TARGET='web' storybook build", + "storybook:dev": "storybook dev -p 3001", + "storybook:build": "storybook build", "clean": "rimraf node_modules dist .turbo storybook-static .tamagui" }, "peerDependencies": { diff --git a/packages/components/vercel.json b/packages/components/vercel.json new file mode 100644 index 00000000..dff5d4f7 --- /dev/null +++ b/packages/components/vercel.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "git": { + "deploymentEnabled": { + "main": false + } + }, + "ignoreCommand": "git diff --quiet HEAD^ HEAD ../../{patches,package.json,turbo.json} ../../packages/{colors,icons} ./", + "installCommand": "yarn install --cwd ../../ --frozen-lockfile", + "buildCommand": "turbo run build --cwd ../../ --filter=components... && yarn storybook:build" +} diff --git a/turbo.json b/turbo.json index 83526388..e7b7c58f 100644 --- a/turbo.json +++ b/turbo.json @@ -10,6 +10,10 @@ "env": ["TAMAGUI_TARGET", "TAMAGUI_DISABLE_WARN_DYNAMIC_LOAD"], "outputs": [".next/**", "!.next/cache/**"] }, + "components#build": { + "dependsOn": ["^build"], + "outputs": ["dist/**", "storybook-static/**"] + }, "dev": { "cache": false },