| 1 | { |
| 2 | "name": "htmx.org", |
| 3 | "version": "4.0.0-beta5", |
| 4 | "description": "A hypermedia-oriented JavaScript library", |
| 5 | "main": "dist/htmx.js", |
| 6 | "module": "dist/htmx.esm.js", |
| 7 | "jsdelivr": "dist/htmx.min.js", |
| 8 | "unpkg": "dist/htmx.min.js", |
| 9 | "types": "dist/htmx.d.ts", |
| 10 | "files": [ |
| 11 | "LICENSE", |
| 12 | "README.md", |
| 13 | "dist/*.js", |
| 14 | "dist/*.map", |
| 15 | "dist/*.d.ts", |
| 16 | "dist/ext/*.js", |
| 17 | "dist/ext/*.map", |
| 18 | "dist/editors", |
| 19 | "dist/skills", |
| 20 | "dist/scripts" |
| 21 | ], |
| 22 | "bin": { |
| 23 | "upgrade-check": "./dist/scripts/upgrade-check.js" |
| 24 | }, |
| 25 | "scripts": { |
| 26 | "build": "npm run build:iife && npm run build:esm && npm run build:minify && npm run build:ext && npm run build:htmax && npm run build:editors && npm run build:skills && npm run build:scripts && npm run build:compress", |
| 27 | "build:htmax": "EXTS='hx-sse hx-ws hx-preload hx-browser-indicator hx-download hx-optimistic hx-targets hx-live'; cat dist/htmx.js $(for e in $EXTS; do echo dist/ext/$e.js; done) > dist/htmax.js && terser --compress --mangle --source-map -o dist/htmax.min.js dist/htmax.js", |
| 28 | "build:skills": "mkdir -p dist/skills && cp src/skills/*.md dist/skills/", |
| 29 | "build:iife": "sed -e 's/__proto__/@@PROTOKEY@@/g' -e 's/__/#/g' -e 's/@@PROTOKEY@@/__proto__/g' src/htmx.js > dist/htmx.js", |
| 30 | "build:esm": "sed -e 's/__proto__/@@PROTOKEY@@/g' -e 's/__/#/g' -e 's/@@PROTOKEY@@/__proto__/g' src/htmx.js > dist/htmx.esm.js && printf '\\nif (typeof window !== \"undefined\") window.htmx = htmx;\\nexport default htmx;\\n' >> dist/htmx.esm.js", |
| 31 | "build:minify": "terser --compress --mangle --source-map -o dist/htmx.min.js dist/htmx.js && terser --compress --mangle --source-map -o dist/htmx.esm.min.js dist/htmx.esm.js", |
| 32 | "build:ext": "mkdir -p dist/ext && for file in src/ext/*.js; do name=$(basename \"$file\" .js); cp \"$file\" \"dist/ext/$name.js\" && terser --compress --mangle --source-map -o \"dist/ext/$name.min.js\" \"dist/ext/$name.js\"; done", |
| 33 | "build:editors": "mkdir -p dist/editors && cp -r src/editors/* dist/editors/", |
| 34 | "build:scripts": "mkdir -p dist/scripts && cp src/scripts/*.js src/scripts/*.py dist/scripts/", |
| 35 | "build:compress": "brotli-cli compress dist/*.js dist/ext/*.js", |
| 36 | "upgrade-check": "python3 src/scripts/upgrade-check.py", |
| 37 | "upgrade-check:test": "python3 src/scripts/upgrade-check.py test/manual/upgrade/", |
| 38 | "test": "npm run test:chrome", |
| 39 | "test:chrome": "web-test-runner --browsers chromium --config test/web-test-runner.config.mjs --playwright", |
| 40 | "test:firefox": "web-test-runner --browsers firefox --config test/web-test-runner.config.mjs --playwright", |
| 41 | "test:webkit": "web-test-runner --browsers webkit --config test/web-test-runner.config.mjs --playwright", |
| 42 | "test:all": "web-test-runner --browsers chromium firefox webkit --config test/web-test-runner.config.mjs --playwright --concurrency 1", |
| 43 | "test:manual": "node test/manual/server.js", |
| 44 | "test:manual:ws": "node test/manual/ws-server.js", |
| 45 | "www:build": "cd www && bun install && bun run build", |
| 46 | "www:dev": "cd www && bun install && bun run dev", |
| 47 | "merge": " (echo \"src/** merge=ours\ndist/** merge=ours\ntest/** merge=ours\n\" > .gitattributes && git add .gitattributes && git merge master); git reset HEAD .gitattributes 2>/dev/null; rm .gitattributes 2>/dev/null\n", |
| 48 | "update-sha": "bash scripts/update-sha.sh" |
| 49 | }, |
| 50 | "repository": { |
| 51 | "type": "git", |
| 52 | "url": "https://github.com/bigskysoftware/htmx" |
| 53 | }, |
| 54 | "keywords": [ |
| 55 | "hypermedia", |
| 56 | "htmx", |
| 57 | "ajax", |
| 58 | "sse" |
| 59 | ], |
| 60 | "workspaces": [ |
| 61 | "ext/*" |
| 62 | ], |
| 63 | "author": "Big Sky Software", |
| 64 | "license": "BSD-0-Clause", |
| 65 | "devDependencies": { |
| 66 | "@tailwindcss/typography": "^0.5.19", |
| 67 | "@web/test-runner": "^0.20.2", |
| 68 | "@web/test-runner-playwright": "^0.11.1", |
| 69 | "brotli-cli": "^2.1.1", |
| 70 | "terser": "^5.46.0", |
| 71 | "ws": "^8.20.0" |
| 72 | } |
| 73 | } |