Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,16 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
environment:
name: development
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }} # tag name
- uses: ./.github/actions/submodules-checkout
with:
submodules-ssh-key: ${{ secrets.PRIVATE_GITHUB_DEPLOY_TOKEN }}

- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-components-animation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}
},
"scripts": {
"build": "vite build --config ../../vite.sdk-components.config.ts",
"build": "vite build && esbuild './lib/*' --outdir=./lib --minify --allow-overwrite --banner:js='//! SPDX-License-Identifier: LicenseRef-Webstudio,Inc-Proprietary'",
"build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.ws.ts !./src/*.template.tsx !./src/*.test.{ts,tsx}' -e asChild -e modal -e defaultOpen -e defaultChecked && prettier --write \"**/*.props.ts\"",
"build:stories": "webstudio-sdk generate-stories && prettier --write \"src/__generated__/*.stories.tsx\"",
"dts": "tsc --project tsconfig.dts.json",
Expand Down
30 changes: 30 additions & 0 deletions packages/sdk-components-animation/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { defineConfig } from "vite";
import { existsSync } from "node:fs";
import path from "node:path";

const hasPrivateFolders = existsSync(
path.join(process.cwd(), "private-src", "README.md")
);

const isBareImport = (id: string) =>
id.startsWith("@") || id.includes(".") === false;

export default defineConfig({
build: {
lib: {
entry: [
hasPrivateFolders ? "private-src/components.ts" : "src/components.ts",
"src/metas.ts",
"src/hooks.ts",
"src/templates.ts",
],
formats: ["es"],
},
rollupOptions: {
external: isBareImport,
output: {
dir: "lib",
},
},
},
});
Loading