@chialab/esbuild-plugin-html
Advanced tools
Comparing version 0.8.13 to 0.9.0
import path from 'path'; | ||
import $ from './esm-cheerio.js'; | ||
import $ from 'cheerio'; | ||
/** | ||
* Collect and bundle each node with a src reference. | ||
* @param {import('./esm-cheerio').Document} dom The DOM element. | ||
* @param {import('cheerio').Cheerio<import('cheerio').Document>} dom The DOM element. | ||
* @param {string} base The base dir. | ||
@@ -8,0 +8,0 @@ * @param {string} outdir The output dir. |
import { promises } from 'fs'; | ||
import path from 'path'; | ||
import $ from './esm-cheerio.js'; | ||
import $ from 'cheerio'; | ||
import { SUPPORTED_MIME_TYPES, generateIcon } from './generateIcon.js'; | ||
@@ -92,3 +92,3 @@ import { generateLaunch } from './generateLaunch.js'; | ||
* Collect and bundle favicons. | ||
* @param {import('./esm-cheerio').Document} dom The DOM element. | ||
* @param {import('cheerio').Cheerio<import('cheerio').Document>} dom The DOM element. | ||
* @param {string} base The base dir. | ||
@@ -95,0 +95,0 @@ * @param {string} outdir The output dir. |
import path from 'path'; | ||
import $ from './esm-cheerio.js'; | ||
import $ from 'cheerio'; | ||
/** | ||
* Collect and bundle each <script> reference. | ||
* @param {import('./esm-cheerio').Document} dom The DOM element. | ||
* @param {import('cheerio').Cheerio<import('cheerio').Document>} dom The DOM element. | ||
* @param {string} base The base dir. | ||
@@ -8,0 +8,0 @@ * @param {string} outdir The output dir. |
import path from 'path'; | ||
import $ from './esm-cheerio.js'; | ||
import $ from 'cheerio'; | ||
/** | ||
* Collect and bundle each <link> reference. | ||
* @param {import('./esm-cheerio').Document} dom The DOM element. | ||
* @param {import('cheerio').Cheerio<import('cheerio').Document>} dom The DOM element. | ||
* @param {string} base The base dir. | ||
@@ -8,0 +8,0 @@ * @param {string} outdir The output dir. |
import { promises } from 'fs'; | ||
import path from 'path'; | ||
import $ from './esm-cheerio.js'; | ||
import $ from 'cheerio'; | ||
import { SUPPORTED_MIME_TYPES, generateIcon } from './generateIcon.js'; | ||
@@ -10,3 +10,3 @@ | ||
* Collect and bundle webmanifests. | ||
* @param {import('./esm-cheerio').Document} dom The DOM element. | ||
* @param {import('cheerio').Cheerio<import('cheerio').Document>} dom The DOM element. | ||
* @param {string} base The base dir. | ||
@@ -13,0 +13,0 @@ * @param {string} outdir The output dir. |
@@ -22,2 +22,8 @@ import path from 'path'; | ||
/** | ||
* @typedef {{ esbuild?: typeof esbuildModule, scriptsTarget?: string, modulesTarget?: string }} PluginOptions | ||
*/ | ||
/** | ||
* A HTML loader plugin for esbuild. | ||
* @param {PluginOptions} options | ||
* @return An esbuild plugin. | ||
@@ -24,0 +30,0 @@ */ |
{ | ||
"name": "@chialab/esbuild-plugin-html", | ||
"type": "module", | ||
"version": "0.8.13", | ||
"version": "0.9.0", | ||
"description": "A HTML loader plugin for esbuild.", | ||
@@ -44,3 +44,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "3cd5d9edd0ce19718dbbbba721e16db5b121c0fd" | ||
"gitHead": "530ad171be0786bc9e5fdc044276467db3a2697a" | ||
} |
/** | ||
* Collect and bundle each node with a src reference. | ||
* @param {import('./esm-cheerio').Document} dom The DOM element. | ||
* @param {import('cheerio').Cheerio<import('cheerio').Document>} dom The DOM element. | ||
* @param {string} base The base dir. | ||
@@ -9,2 +9,2 @@ * @param {string} outdir The output dir. | ||
*/ | ||
export function collectAssets(dom: import('./esm-cheerio').Document, base: string, outdir: string, options: import('esbuild').BuildOptions): import('./index').Entrypoint[]; | ||
export function collectAssets(dom: import('cheerio').Cheerio<import('cheerio').Document>, base: string, outdir: string, options: import('esbuild').BuildOptions): import('./index').Entrypoint[]; |
/** | ||
* Collect and bundle favicons. | ||
* @param {import('./esm-cheerio').Document} dom The DOM element. | ||
* @param {import('cheerio').Cheerio<import('cheerio').Document>} dom The DOM element. | ||
* @param {string} base The base dir. | ||
@@ -8,2 +8,2 @@ * @param {string} outdir The output dir. | ||
*/ | ||
export function collectIcons(dom: import('./esm-cheerio').Document, base: string, outdir: string): import('./index').Entrypoint[]; | ||
export function collectIcons(dom: import('cheerio').Cheerio<import('cheerio').Document>, base: string, outdir: string): import('./index').Entrypoint[]; |
/** | ||
* Collect and bundle each <script> reference. | ||
* @param {import('./esm-cheerio').Document} dom The DOM element. | ||
* @param {import('cheerio').Cheerio<import('cheerio').Document>} dom The DOM element. | ||
* @param {string} base The base dir. | ||
@@ -9,5 +9,5 @@ * @param {string} outdir The output dir. | ||
*/ | ||
export function collectScripts(dom: import('./esm-cheerio').Document, base: string, outdir: string, targets: { | ||
export function collectScripts(dom: import('cheerio').Cheerio<import('cheerio').Document>, base: string, outdir: string, targets: { | ||
scriptsTarget: string; | ||
modulesTarget: string; | ||
} | undefined, options: import('esbuild').BuildOptions): import('./index').Entrypoint[]; |
/** | ||
* Collect and bundle each <link> reference. | ||
* @param {import('./esm-cheerio').Document} dom The DOM element. | ||
* @param {import('cheerio').Cheerio<import('cheerio').Document>} dom The DOM element. | ||
* @param {string} base The base dir. | ||
@@ -9,2 +9,2 @@ * @param {string} outdir The output dir. | ||
*/ | ||
export function collectStyles(dom: import('./esm-cheerio').Document, base: string, outdir: string, options: import('esbuild').BuildOptions): import('./index').Entrypoint[]; | ||
export function collectStyles(dom: import('cheerio').Cheerio<import('cheerio').Document>, base: string, outdir: string, options: import('esbuild').BuildOptions): import('./index').Entrypoint[]; |
/** | ||
* Collect and bundle webmanifests. | ||
* @param {import('./esm-cheerio').Document} dom The DOM element. | ||
* @param {import('cheerio').Cheerio<import('cheerio').Document>} dom The DOM element. | ||
* @param {string} base The base dir. | ||
@@ -8,2 +8,2 @@ * @param {string} outdir The output dir. | ||
*/ | ||
export function collectWebManifest(dom: import('./esm-cheerio').Document, base: string, outdir: string): import('./index').Entrypoint[]; | ||
export function collectWebManifest(dom: import('cheerio').Cheerio<import('cheerio').Document>, base: string, outdir: string): import('./index').Entrypoint[]; |
@@ -8,9 +8,10 @@ /** | ||
/** | ||
* @typedef {{ esbuild?: typeof esbuildModule, scriptsTarget?: string, modulesTarget?: string }} PluginOptions | ||
*/ | ||
/** | ||
* A HTML loader plugin for esbuild. | ||
* @param {PluginOptions} options | ||
* @return An esbuild plugin. | ||
*/ | ||
export default function _default({ esbuild, scriptsTarget, modulesTarget }?: { | ||
esbuild?: typeof esbuildModule | undefined; | ||
scriptsTarget?: string | undefined; | ||
modulesTarget?: string | undefined; | ||
}): esbuildModule.Plugin; | ||
export default function _default({ esbuild, scriptsTarget, modulesTarget }?: PluginOptions): esbuildModule.Plugin; | ||
export type Entrypoint = { | ||
@@ -30,2 +31,7 @@ /** | ||
}; | ||
export type PluginOptions = { | ||
esbuild?: typeof esbuildModule; | ||
scriptsTarget?: string; | ||
modulesTarget?: string; | ||
}; | ||
import esbuildModule from "esbuild"; |
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
42314
812
20