payload-section-builder 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/package.json +23 -43
package/README.md
CHANGED
|
@@ -113,6 +113,17 @@ pnpm test:e2e # select and move a section in the browser (Playwright)
|
|
|
113
113
|
pnpm build # outputs dist/
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
+
## Publishing
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npm version patch # or minor; commit and tag
|
|
120
|
+
npm publish # the prepare script builds dist first
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`exports` already point at `dist`, so `npm publish` and `pnpm publish` produce the same package.
|
|
124
|
+
Check what will ship with `npm pack --dry-run`: every entry point needs a `.js` and a `.d.ts` file
|
|
125
|
+
in `dist/`.
|
|
126
|
+
|
|
116
127
|
## License
|
|
117
128
|
|
|
118
129
|
MIT
|
package/package.json
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload-section-builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Visual section builder for Payload CMS: select, edit and rearrange page sections from the live preview.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
9
|
+
"psb-source": "./src/index.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
12
13
|
},
|
|
13
14
|
"./client": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
"psb-source": "./src/exports/client.ts",
|
|
16
|
+
"import": "./dist/exports/client.js",
|
|
17
|
+
"types": "./dist/exports/client.d.ts",
|
|
18
|
+
"default": "./dist/exports/client.js"
|
|
17
19
|
},
|
|
18
20
|
"./overlay": {
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
21
|
+
"psb-source": "./src/exports/overlay.ts",
|
|
22
|
+
"import": "./dist/exports/overlay.js",
|
|
23
|
+
"types": "./dist/exports/overlay.d.ts",
|
|
24
|
+
"default": "./dist/exports/overlay.js"
|
|
22
25
|
},
|
|
23
26
|
"./react": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
+
"psb-source": "./src/exports/react.ts",
|
|
28
|
+
"import": "./dist/exports/react.js",
|
|
29
|
+
"types": "./dist/exports/react.d.ts",
|
|
30
|
+
"default": "./dist/exports/react.js"
|
|
27
31
|
}
|
|
28
32
|
},
|
|
29
|
-
"main": "./
|
|
30
|
-
"types": "./
|
|
33
|
+
"main": "./dist/index.js",
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
31
35
|
"files": [
|
|
32
36
|
"dist"
|
|
33
37
|
],
|
|
34
38
|
"scripts": {
|
|
35
|
-
"build": "pnpm copyfiles && pnpm build:types && pnpm build:swc",
|
|
39
|
+
"build": "pnpm clean && pnpm copyfiles && pnpm build:types && pnpm build:swc",
|
|
36
40
|
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
37
41
|
"build:types": "tsc --outDir dist --rootDir ./src",
|
|
38
42
|
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
@@ -40,11 +44,12 @@
|
|
|
40
44
|
"dev": "next dev dev --turbo",
|
|
41
45
|
"dev:generate-importmap": "pnpm dev:payload generate:importmap",
|
|
42
46
|
"dev:generate-types": "pnpm dev:payload generate:types",
|
|
43
|
-
"dev:payload": "cross-env PAYLOAD_CONFIG_PATH=./dev/payload.config.ts payload",
|
|
47
|
+
"dev:payload": "cross-env NODE_OPTIONS=--conditions=psb-source PAYLOAD_CONFIG_PATH=./dev/payload.config.ts payload",
|
|
44
48
|
"generate:importmap": "pnpm dev:generate-importmap",
|
|
45
49
|
"generate:types": "pnpm dev:generate-types",
|
|
46
50
|
"lint": "eslint",
|
|
47
51
|
"lint:fix": "eslint ./src --fix",
|
|
52
|
+
"prepare": "pnpm build",
|
|
48
53
|
"test": "pnpm test:int && pnpm test:e2e",
|
|
49
54
|
"test:e2e": "playwright test",
|
|
50
55
|
"test:int": "vitest",
|
|
@@ -92,32 +97,7 @@
|
|
|
92
97
|
"node": "^22.23.4 || >=24.22.1",
|
|
93
98
|
"pnpm": "^9 || ^10 || ^11"
|
|
94
99
|
},
|
|
95
|
-
"
|
|
96
|
-
"exports": {
|
|
97
|
-
".": {
|
|
98
|
-
"import": "./dist/index.js",
|
|
99
|
-
"types": "./dist/index.d.ts",
|
|
100
|
-
"default": "./dist/index.js"
|
|
101
|
-
},
|
|
102
|
-
"./client": {
|
|
103
|
-
"import": "./dist/exports/client.js",
|
|
104
|
-
"types": "./dist/exports/client.d.ts",
|
|
105
|
-
"default": "./dist/exports/client.js"
|
|
106
|
-
},
|
|
107
|
-
"./overlay": {
|
|
108
|
-
"import": "./dist/exports/overlay.js",
|
|
109
|
-
"types": "./dist/exports/overlay.d.ts",
|
|
110
|
-
"default": "./dist/exports/overlay.js"
|
|
111
|
-
},
|
|
112
|
-
"./react": {
|
|
113
|
-
"import": "./dist/exports/react.js",
|
|
114
|
-
"types": "./dist/exports/react.d.ts",
|
|
115
|
-
"default": "./dist/exports/react.js"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"main": "./dist/index.js",
|
|
119
|
-
"types": "./dist/index.d.ts"
|
|
120
|
-
},
|
|
100
|
+
"packageManager": "pnpm@10.28.0",
|
|
121
101
|
"pnpm": {
|
|
122
102
|
"onlyBuiltDependencies": [
|
|
123
103
|
"sharp",
|