You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- All source files (e2e, support, base-config.ts, extend-config.ts, globals.d.ts) are copied into a temporary `tmp/` directory before build.
148
+
- The build script (`build.sh`) normalizes internal imports and compiles TypeScript from `tmp/` to `dist/` using `tsconfig.build.json`.
149
+
- After compilation, TypeScript source files are also copied to `dist/` for better developer experience.
150
+
- Non-TypeScript assets (README, package.json, etc.) are copied to `dist/` for publishing.
151
+
- The published npm package only includes the `dist/` directory, as specified in `package.json`.
152
+
153
+
### TypeScript Configuration
154
+
-`tsconfig.build.json` extends the main `tsconfig.json` but restricts compilation to `tmp/**/*` and outputs only to `dist/`.
155
+
- Source maps and declaration maps are generated for easier debugging and type navigation.
156
+
157
+
### Clean Build Guarantee
158
+
- Only the files actually referenced by the cypress code are included in the build, keeping the package minimal.
159
+
160
+
### Publishing
161
+
- To manual publish, run:
162
+
```bash
163
+
npm run build
164
+
cd dist
165
+
npm publish
166
+
```
167
+
- To automate publishing, use the provided GitHub Actions workflow.
168
+
Add a new release tag, and the workflow will build and publish the package to npm.
169
+
```bash
170
+
git tag cypress-pkg-v1.0.0
171
+
git push upstream cypress-pkg-v1.0.0
172
+
```
173
+
174
+
### Troubleshooting
175
+
- If you see build errors not shown in VS Code, ensure you are using the same TypeScript config (`tsconfig.build.json`) for both build and editor, or manually run `npx tsc --project tsconfig.build.json` to check.
176
+
- If you see stray build artifacts in dependency directories, check the build script and tsconfig paths to ensure all compilation is isolated to `tmp/` and `dist/`.
0 commit comments