mirror of
https://github.com/bigskysoftware/htmx.git
synced 2026-01-25 05:06:13 +00:00
Add AMD distribution
This commit is contained in:
@@ -8,7 +8,7 @@ HTMX_SRC=src/htmx.js
|
||||
rm -rf dist/*
|
||||
|
||||
# Regular IIFE script
|
||||
cp $HTMX_SRC dist/
|
||||
cp $HTMX_SRC dist/htmx.js
|
||||
|
||||
# Minified script
|
||||
uglifyjs -m eval -o dist/htmx.min.js dist/htmx.js
|
||||
@@ -16,6 +16,14 @@ uglifyjs -m eval -o dist/htmx.min.js dist/htmx.js
|
||||
# Gzipped script
|
||||
gzip -9 -k -f dist/htmx.min.js > dist/htmx.min.js.gz
|
||||
|
||||
# AMD script
|
||||
cat > dist/htmx.amd.js << EOF
|
||||
define(() => {
|
||||
$(cat $HTMX_SRC)
|
||||
return htmx
|
||||
})
|
||||
EOF
|
||||
|
||||
# CJS script
|
||||
cat > dist/htmx.cjs.js << EOF
|
||||
$(cat $HTMX_SRC)
|
||||
|
||||
Reference in New Issue
Block a user