ref: optimize for minifying harder

This commit is contained in:
AJ ONeal 2024-08-29 18:36:30 -06:00
parent 0635d41907
commit 77ad53208e
No known key found for this signature in database
GPG Key ID: F1D692A76F70CF98
3 changed files with 7 additions and 4 deletions

View File

@ -3,7 +3,7 @@
The fastest, most lightweight, fewest dependency jQuery alternative.
Development Build: 572B (types + comments) \
Production Build: 146B (min + gz)
Production Build: 117B (min + gz)
## Example Usage

View File

@ -15,9 +15,9 @@
console.log("globalThis.AJQuery:", globalThis.AJQuery);
</script>
<script type="module" src="./ajquery.min.mjs"></script>
<script type="module" src="./ajquery.mjs"></script>
<script type="module">
import AJQuery from "./ajquery.mjs";
import AJQuery from "./ajquery.min.mjs";
console.log("imported AJQuery", AJQuery);
</script>
</body>

View File

@ -32,7 +32,10 @@
"start": "open http://localhost/example.html && caddy file-server --browse --root .",
"test": "node ./tests/",
"--------": "---------------------------------------",
"build-all": "npx uglify-js ajquery.js -o ajquery.min.js && npx uglify-js ajquery.cjs -o ajquery.min.cjs && npx uglify-js ajquery.js -o ajquery.min.mjs",
"build-all": "npm run build-js && npm run build-cjs && npm run build-mjs",
"build-js": "npx -p uglify-js@3 uglifyjs --compress 'assignments' --mangle reserved='[\"$\",\"$$\",\"require\",\"exports\"]' ajquery.js -o ajquery.min.js",
"build-cjs": "npx -p uglify-js@3 uglifyjs --compress 'assignments' --mangle reserved='[\"$\",\"$$\",\"require\",\"exports\"]' ajquery.cjs -o ajquery.min.cjs",
"build-mjs": "npx -p uglify-js@3 uglifyjs --compress 'assignments' --mangle reserved='[\"$\",\"$$\"]' ajquery.mjs -o ajquery.min.mjs",
"jshint": "npx -p jshint@2.x -- jshint -c ./.jshintrc ./ajquery.js ./ajquery.cjs ./ajquery.mjs",
"prepare": "npm run build",
"prepublish": "npm run reexport-types",