esbuild-metadata-report
Advanced tools
Comparing version 1.0.0 to 1.0.1
module.exports = { | ||
name: 'Metadata Report', | ||
outputFile: './metadata-reports/index.html' | ||
outputFile: './metadata-reports/index.html', | ||
json: false | ||
}; |
@@ -8,2 +8,3 @@ import type { Plugin, Metafile } from 'esbuild'; | ||
outputFile?: string; | ||
json?: boolean; | ||
metadata?: Metafile; | ||
@@ -10,0 +11,0 @@ } |
@@ -46,2 +46,9 @@ const fs = require('fs'); | ||
if (options.json) { | ||
// save json | ||
const filename = path.basename(htmlPath, '.html'); | ||
const jsonPath = path.resolve(htmlDir, `${filename}.json`); | ||
fs.writeFileSync(jsonPath, JSON.stringify(reportData, null, 4)); | ||
} | ||
return htmlPath; | ||
@@ -48,0 +55,0 @@ }; |
{ | ||
"name": "esbuild-metadata-report", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "esbuild metadata report", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
# esbuild-metadata-report | ||
> Metadata Report for esbuild | ||
> Metadata Report for [esbuild](https://github.com/evanw/esbuild) | ||
[![](https://img.shields.io/npm/v/esbuild-metadata-report)](https://www.npmjs.com/package/esbuild-metadata-report) | ||
[![](https://badgen.net/npm/dw/esbuild-metadata-report)](https://www.npmjs.com/package/esbuild-metadata-report) | ||
![](https://img.shields.io/github/license/cenfun/esbuild-metadata-report) | ||
## Preview | ||
@@ -5,0 +9,0 @@ - [https://cenfun.github.io/esbuild-metadata-report/](https://cenfun.github.io/esbuild-metadata-report/) |
341706
85
52