Skip to content

Commit

Permalink
update deps, add prettier config, jsdoc comment (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
rossrobino authored Aug 9, 2024
1 parent 579d721 commit 4cdba54
Show file tree
Hide file tree
Showing 13 changed files with 2,869 additions and 961 deletions.
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
node_modules
dist
package-lock.json
2 changes: 2 additions & 0 deletions dist/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var f=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},a=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of p(e))!s.call(t,i)&&i!==r&&n(t,i,{get:()=>e[i],enumerable:!(o=l(e,i))||o.enumerable});return t};var y=t=>a(n({},"__esModule",{value:!0}),t);var b={};f(b,{ViteMinifyPlugin:()=>m,default:()=>d});module.exports=y(b);var u=require("html-minifier-terser");function m(t){return{name:"vite-plugin-minify",apply:"build",transformIndexHtml:{order:"post",handler(e){return(0,u.minify)(e,{removeComments:!0,collapseWhitespace:!0,collapseBooleanAttributes:!0,removeAttributeQuotes:!1,removeEmptyAttributes:!0,minifyCSS:!0,minifyJS:!0,minifyURLs:!0,...t})}}}}var d=m;0&&(module.exports={ViteMinifyPlugin});
//# sourceMappingURL=index.cjs.map
1 change: 1 addition & 0 deletions dist/index.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions dist/index.d.cts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Plugin } from 'vite';
import { Options } from 'html-minifier-terser';

/**
* @param options [html-minifier-terser options](https://github.com/terser/html-minifier-terser?tab=readme-ov-file#options-quick-reference)
*
* @default
*
* {
* removeComments: true,
* collapseWhitespace: true,
* collapseBooleanAttributes: true,
* removeAttributeQuotes: false,
* removeEmptyAttributes: true,
* minifyCSS: true,
* minifyJS: true,
* minifyURLs: true,
* ...options, // user provided options
* }
*
* @returns vite-plugin-minify
*/
declare function ViteMinifyPlugin(options?: Options): Plugin;

export { ViteMinifyPlugin, ViteMinifyPlugin as default };
19 changes: 19 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
import { Plugin } from 'vite';
import { Options } from 'html-minifier-terser';

/**
* @param options [html-minifier-terser options](https://github.com/terser/html-minifier-terser?tab=readme-ov-file#options-quick-reference)
*
* @default
*
* {
* removeComments: true,
* collapseWhitespace: true,
* collapseBooleanAttributes: true,
* removeAttributeQuotes: false,
* removeEmptyAttributes: true,
* minifyCSS: true,
* minifyJS: true,
* minifyURLs: true,
* ...options, // user provided options
* }
*
* @returns vite-plugin-minify
*/
declare function ViteMinifyPlugin(options?: Options): Plugin;

export { ViteMinifyPlugin, ViteMinifyPlugin as default };
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions dist/index.mjs

This file was deleted.

1 change: 0 additions & 1 deletion dist/index.mjs.map

This file was deleted.

Loading

0 comments on commit 4cdba54

Please sign in to comment.