esbuild-html-plugin
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "esbuild-html-plugin", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "An esbuild plugin that generates an HTML file.", | ||
@@ -11,5 +11,5 @@ "repository": { | ||
"author": "Clemens Akens", | ||
"sideEffects": false, | ||
"type": "module", | ||
"exports": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"files": [ | ||
@@ -19,3 +19,2 @@ "lib" | ||
"scripts": { | ||
"ci": "run-p compile:check compile:emit format:check lint", | ||
"compile:check": "tsc", | ||
@@ -33,15 +32,14 @@ "compile:emit": "tsc --project tsconfig.emit.json", | ||
"devDependencies": { | ||
"@types/html-minifier": "^4.0.2", | ||
"@types/node": "^20.2.5", | ||
"@typescript-eslint/eslint-plugin": "^5.59.8", | ||
"@typescript-eslint/parser": "^5.59.8", | ||
"esbuild": "^0.17.19", | ||
"eslint": "^8.41.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-markdown": "^3.0.0", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.8.8", | ||
"typescript": "^5.0.4" | ||
"@types/html-minifier": "^4.0.5", | ||
"@types/node": "^20.9.0", | ||
"@typescript-eslint/eslint-plugin": "^6.10.0", | ||
"@typescript-eslint/parser": "^6.10.0", | ||
"esbuild": "^0.19.5", | ||
"eslint": "^8.53.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-import": "^2.29.0", | ||
"eslint-plugin-markdown": "^3.0.1", | ||
"prettier": "^3.0.3", | ||
"typescript": "^5.2.2" | ||
} | ||
} |
# esbuild-html-plugin | ||
> An esbuild plugin that generates an HTML file by providing access to the | ||
> output URLs of the bundled assets while allowing customization of head and | ||
> body elements. Minification is controlled by esbuild's `minify` option. | ||
> An esbuild plugin that generates an HTML file. | ||
This esbuild plugin allows the creation of an HTML file featuring output URLs of bundled assets, | ||
while supporting customization of head and body elements. The esbuild's `minify` option handles | ||
minification. | ||
## Installation | ||
@@ -13,3 +15,3 @@ | ||
## Usage | ||
## Usage Example | ||
@@ -29,2 +31,8 @@ ```js | ||
createHeadElements: () => [ | ||
`<meta charset="utf-8" />`, | ||
`<meta name="viewport" content="width=device-width, initial-scale=1" />`, | ||
`<title>Example</title>`, | ||
], | ||
createBodyElements: (outputUrls) => | ||
@@ -43,4 +51,4 @@ outputUrls | ||
The output file's name for the generated HTML. This name will be combined with | ||
the `outdir` or the dirname of the `outfile` from the esbuild options. | ||
The output file's name for the generated HTML. This name will be combined with the `outdir` or the | ||
dirname of the `outfile` from the esbuild options. | ||
@@ -65,4 +73,4 @@ ``` | ||
A function that receives the output URLs of the bundled assets and returns an | ||
array of strings representing the custom head elements. | ||
A function that receives the output URLs of the bundled assets and returns an array of strings | ||
representing the custom head elements. | ||
@@ -80,4 +88,4 @@ ``` | ||
A function that receives the output URLs of the bundled assets and returns an | ||
array of strings representing the custom body elements. | ||
A function that receives the output URLs of the bundled assets and returns an array of strings | ||
representing the custom body elements. | ||
@@ -84,0 +92,0 @@ ``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
11396
11
95
0