{"id":22633,"library":"vite-plugin-custom-functions-metadata","title":"vite-plugin-custom-functions-metadata","description":"Vite plugin (v1.0.1) that generates JSON metadata for custom Excel functions from TypeScript source files, intended for Office Add-ins development. It scans a given input file for JSDoc-annotated functions and outputs a metadata JSON file referencing function names, descriptions, and parameters. The plugin is designed to integrate into the Vite build pipeline, automating metadata generation that would otherwise require manual maintenance. Differentiators: dedicated to Excel custom functions, leverages TypeScript type definitions, and provides a simple plugin interface for modern Vite projects. Release cadence is currently low; no breaking changes known.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"github.com/abrasher/vite-plugin-custom-functions-metadata","tags":["javascript","vite","excel","plugin","officejs","typescript"],"install":[{"cmd":"npm install vite-plugin-custom-functions-metadata","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-custom-functions-metadata","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-custom-functions-metadata","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; the plugin is designed to work with Vite","package":"vite","optional":false}],"imports":[{"note":"ESM-only; CommonJS require will fail.","wrong":"const customFunctionsMetadataPlugin = require('vite-plugin-custom-functions-metadata')","symbol":"default","correct":"import customFunctionsMetadataPlugin from 'vite-plugin-custom-functions-metadata'"},{"note":"The package exports a default export, not a named export.","wrong":"import { customFunctionsMetadataPlugin } from 'vite-plugin-custom-functions-metadata'","symbol":"customFunctionsMetadataPlugin","correct":"import customFunctionsMetadataPlugin from 'vite-plugin-custom-functions-metadata'"},{"note":"TypeScript users can import the type for options when configuring the plugin.","wrong":"","symbol":"PluginOptions","correct":"import type { PluginOptions } from 'vite-plugin-custom-functions-metadata'"}],"quickstart":{"code":"import { defineConfig } from 'vite';\nimport customFunctionsMetadataPlugin from 'vite-plugin-custom-functions-metadata';\nimport { resolve } from 'path';\n\nexport default defineConfig({\n  plugins: [\n    customFunctionsMetadataPlugin({\n      inputFile: resolve(__dirname, 'src/functions/functions.ts'),\n      outputFile: resolve(__dirname, 'src/functions/functions.json'),\n    }),\n  ],\n});","lang":"typescript","description":"Configures the Vite plugin to generate Excel custom functions metadata from a TypeScript input file."},"warnings":[{"fix":"Create a barrel file that re-exports all custom functions from separate modules.","message":"The plugin only processes a single input file; if your functions are split across multiple files, you must manually aggregate them into one input file or use a workaround.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Do not manually edit the output file; treat it as a build artifact.","message":"The output JSON file is overwritten on every build; ensure no manual edits are lost.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add JSDoc tags like @customfunction, @param, @returns to your functions.","message":"JSDoc annotations are required for function metadata to be generated; plain TypeScript without JSDoc will not produce entries.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Pin to version 1.x and test upgrades.","message":"No breaking changes known yet; however, the plugin is at v1.0.x and may introduce breaking changes in future major versions.","severity":"breaking","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'add':26 'add-in':25 'annot':38 'autom':63 'break':98 'build':61 'cadenc':93 'chang':99 'current':95 'custom':4,15,76 'dedic':73 'definit':81 'descript':49 'design':55 'develop':28 'differenti':72 'excel':16,75,103 'file':21,34,45 'function':5,17,39,47,77 'generat':11,65 'given':32 'in':27 'input':33 'integr':57 'intend':22 'interfac':87 'javascript':101 'jsdoc':37 'jsdoc-annot':36 'json':12,44 'known':100 'leverag':78 'low':96 'mainten':71 'manual':70 'metadata':6,13,43,64 'modern':89 'name':48 'offic':24 'officej':105 'otherwis':68 'output':41 'paramet':51 'pipelin':62 'plugin':3,8,53,86,104 'project':91 'provid':83 'referenc':46 'releas':92 'requir':69 'scan':30 'simpl':85 'sourc':20 'type':80 'typescript':19,79,106 'v1.0.1':9 'vite':2,7,60,90,102 'vite-plugin-custom-functions-metadata':1 'would':67","created_at":"2026-04-27T17:06:12.558045+00:00","updated_at":"2026-04-27T17:06:12.558045+00:00","problems":[{"fix":"Install with 'npm install vite-plugin-custom-functions-metadata --save-dev' and use import syntax.","cause":"Package not installed or using require() in an ESM-only package.","error":"Error: Cannot find module 'vite-plugin-custom-functions-metadata'"},{"fix":"Use 'import customFunctionsMetadataPlugin from ...' instead of destructured import.","cause":"Default import expected but named import used incorrectly.","error":"TypeError: customFunctionsMetadataPlugin is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/abrasher/vite-plugin-custom-functions-metadata","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vite-plugin-custom-functions-metadata","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-18","next_check":"2026-07-26","install_tag":null}}