dredless 0.2.1 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dredless",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "A fully-featured and from-scratch headless drednot.io client implementation written in pure js.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/certainhuman/dredless#readme",
@@ -20,6 +20,8 @@
20
20
  "type": "module",
21
21
  "main": "src/index.js",
22
22
  "types": "./src/index.d.ts",
23
+ "unpkg": "./dist/browser/dredless.global.js",
24
+ "jsdelivr": "./dist/browser/dredless.global.js",
23
25
  "exports": {
24
26
  ".": {
25
27
  "types": "./src/index.d.ts",
@@ -155,19 +157,22 @@
155
157
  "files": [
156
158
  "src",
157
159
  "docs",
158
- "README.md"
160
+ "README.md",
161
+ "dist"
159
162
  ],
160
163
  "publishConfig": {
161
164
  "access": "public"
162
165
  },
163
166
  "scripts": {
167
+ "build": "node scripts/build-browser.js",
164
168
  "check": "node scripts/check-syntax.js",
165
169
  "test": "node --test \"test/*.test.js\"",
166
170
  "pack:check": "npm pack --dry-run",
167
- "prepublishOnly": "npm run check && npm test",
171
+ "prepublishOnly": "npm run check && npm test && npm run build",
168
172
  "update:item-schema": "node scripts/update-item-schema.js"
169
173
  },
170
174
  "devDependencies": {
171
- "dsa-shipshape": "^0.1.2"
175
+ "dsa-shipshape": "^0.1.2",
176
+ "esbuild": "^0.28.2"
172
177
  }
173
178
  }
@@ -0,0 +1,3 @@
1
+ import DredlessBrowser from "./browser.js";
2
+
3
+ globalThis.Dredless = DredlessBrowser;