@zohocorporation/analytics-customviz-devkit
v0.1.0
Published
Local development helpers for Zoho Analytics custom visuals
Downloads
45
Maintainers
Readme
Zoho Analytics CustomViz Dev Kit
This package is intended to be published and installed in a custom visual development project.
It provides:
zoho-analytics-customviz: a CLI that readsZAViz_Manifest.json, serves local assets, and starts the reload watcherlocal-asset-server.js: a simple built-in static file server for developmentdev-asset-server.js: the watcher and SSE server used by the Analytics iframe during development
Initialize A Project
Create a new starter project:
npx zoho-analytics-customviz init my-visualThis generates:
ZAViz_Manifest.jsonmain.jsicon.png
Create inside the current directory:
npx zoho-analytics-customviz initExpected Manifest Shape
{
"mode": "development",
"devServer": {
"files": ["main.js", "zc.js"],
"port": 3000,
"watchPort": 3101
}
}Install
npm install --save-dev @zoho/analytics-customviz-devkitor
npm install -g @zoho/analytics-customviz-devkitUsage
Start with the built-in local asset server:
npx zoho-analytics-customviz init my-visual
cd my-visual
npx zoho-analytics-customviz dev --manifest ./ZAViz_Manifest.jsonStart your own asset server command and the watcher together:
npx zoho-analytics-customviz dev --manifest ./ZAViz_Manifest.json --asset-command "npm run dev"The default mode serves files from the manifest directory on devServer.port and listens for reload events on devServer.watchPort.
Use --asset-command only when your project needs a bundler or framework dev server such as Vite, Webpack, or React.
