@@ -490,6 +490,8 @@ export const getStackClient = (queryClient: QueryClient) => {
490490
491491### Step 10: Build and Publish
492492
493+ Before publishing, make sure everything is working:
494+
493495``` bash
494496# Build your plugin
495497pnpm --filter @your-username/your-plugin-name build
@@ -500,11 +502,44 @@ pnpm --filter @your-username/your-plugin-name typecheck
500502# Run linting
501503pnpm --filter @your-username/your-plugin-name lint
502504
505+ # Run unit tests
506+ pnpm --filter @your-username/your-plugin-name test
507+
508+ # Run e2e tests
509+ pnpm e2e:smoke
510+ ```
511+
512+ ** Manual Publishing:**
513+
514+ ``` bash
503515# Publish to npm (make sure you're logged in: npm login)
504516cd packages/plugin
505517npm publish --access public
506518```
507519
520+ ** Automated Publishing with GitHub Actions:**
521+
522+ This repository includes a GitHub Actions workflow that automatically publishes your plugin to npm when you create a GitHub release.
523+
524+ 1 . ** Update the version** in ` packages/plugin/package.json ` :
525+ ``` json
526+ {
527+ "version" : " 1.0.0"
528+ }
529+ ```
530+
531+ 2 . ** Create a GitHub release** with a tag matching the version (e.g., ` v1.0.0 ` ):
532+ - Go to your repository on GitHub
533+ - Click "Releases" → "Create a new release"
534+ - Create a new tag (e.g., ` v1.0.0 ` )
535+ - The tag version must match the ` package.json ` version exactly
536+
537+ 3 . ** The workflow will automatically** :
538+ - Build the project
539+ - Verify the tag matches the package version
540+ - Publish to npm
541+
542+
508543## Commands
509544
510545### Root Level Commands
@@ -513,6 +548,7 @@ npm publish --access public
513548- ` pnpm dev ` - Start development servers in watch mode
514549- ` pnpm lint ` - Lint all packages
515550- ` pnpm typecheck ` - Type check all packages
551+ - ` pnpm test ` - Run unit tests for all packages
516552- ` pnpm e2e:smoke ` - Run end-to-end smoke tests
517553- ` pnpm format ` - Format code with Prettier
518554
@@ -572,20 +608,38 @@ The project uses Tailwind CSS v4. Plugin styles are automatically included when
572608
573609### Unit Tests
574610
575- Your plugin includes unit tests using Vitest:
611+ Your plugin includes unit tests using Vitest. Run tests for all packages:
612+
613+ ``` bash
614+ pnpm test
615+ ```
616+
617+ Or run tests for a specific package:
576618
577619``` bash
578620pnpm --filter @your-username/your-plugin-name test
579621```
580622
581623### E2E Tests
582624
583- End-to-end tests are located in the ` e2e/ ` directory and use Playwright:
625+ End-to-end tests are located in the ` e2e/ ` directory and use Playwright. Run the smoke tests :
584626
585627``` bash
586628pnpm e2e:smoke
587629```
588630
631+ This command will:
632+ - Build all packages
633+ - Start the example Next.js application
634+ - Run Playwright tests against the running application
635+
636+ For interactive debugging, you can run the Playwright UI:
637+
638+ ``` bash
639+ cd e2e
640+ pnpm e2e:ui
641+ ```
642+
589643## Project Structure Best Practices
590644
5916451 . ** Separate API and Client** : Keep backend (` api/ ` ) and frontend (` client/ ` ) code separate
@@ -607,11 +661,3 @@ The `plugin` package is your starting point and serves as a complete reference i
607661- SSR and meta generation
608662
609663Modify the ` plugin ` to build your own plugin, then publish it to npm under your own account.
610-
611- ## License
612-
613- [ Add your license here]
614-
615- ## Contributing
616-
617- [ Add contribution guidelines here]
0 commit comments