Skip to content

Commit

Permalink
Merge pull request #691 from thebuilder/feat/remove-dist-copy
Browse files Browse the repository at this point in the history
feat: remove script to publish dist dir
  • Loading branch information
thebuilder authored Jul 11, 2024
2 parents 7feb5b6 + 214cf98 commit 6e90b03
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 93 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pkg-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
cache: "pnpm"
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build
- name: Publish preview package
run: pnpx pkg-pr-new publish --no-template
14 changes: 5 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"version": "8.26.1",
"description": "Monitor if a component is inside the viewport, using IntersectionObserver API",
"type": "commonjs",
"source": "./src/index.tsx",
"main": "./dist/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/index.d.ts",
"source": "src/index.tsx",
"main": "dist/index.js",
"module": "dist/esm/index.js",
"types": "dist/index.d.ts",
"exports": {
"./test-utils": {
"types": "./dist/test-utils.d.mts",
Expand All @@ -19,30 +19,26 @@
"default": "./dist/index.mjs"
}
},
"files": ["dist"],
"author": "Daniel Schmidt",
"license": "MIT",
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/thebuilder/react-intersection-observer.git"
},
"engines": {
"pnpm": ">=9"
},
"packageManager": "[email protected]+sha256.dbdf5961c32909fb030595a9daa1dae720162e658609a8f92f2fa99835510ca5",
"scripts": {
"prebuild": "rm -rf dist lib",
"build": "run-s build:*",
"build:bundle": "tsup src/index.tsx",
"build:legacy": "tsup src/index.tsx --format esm --legacy-output --no-clean --no-dts",
"build:utils": "tsup src/test-utils.ts --no-clean --no-sourcemap",
"build:copy": "node scripts/build-copy.cjs",
"postbuild": "size-limit",
"dev": "run-p dev:*",
"dev:package": "tsup src/index.tsx --watch",
"dev:storybook": "pnpm --filter storybook dev",
"lint": "biome check .",
"release": "np --contents dist",
"version": "pnpm build",
"storybook:build": "pnpm build:bundle && pnpm --filter storybook build",
"test": "vitest"
Expand Down
20 changes: 9 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 0 additions & 71 deletions scripts/build-copy.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion src/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ afterEach(() => {
* Create a custom IntersectionObserver mock, allowing us to intercept the `observe` and `unobserve` calls.
* We keep track of the elements being observed, so when `mockAllIsIntersecting` is triggered it will
* know which elements to trigger the event on.
* @param mockFn The mock function to use. Defaults to `jest.fn`.
* @param mockFn The mock function to use. Defaults to `vi.fn`.
*/
export function setupIntersectionMocking(mockFn: typeof jest.fn) {
global.IntersectionObserver = mockFn((cb, options = {}) => {
Expand Down

0 comments on commit 6e90b03

Please sign in to comment.