Files
jarvis-at-skic 3347cc342c feat: draw.io custom shapes analysis + buildable example plugin
- ANALYSIS.md: Full architecture analysis of draw.io shape systems
  (XML stencils vs JS shapes, plugin loading, desktop/web support)
- Example plugin with 5 custom shapes demonstrating JS logic:
  - StatusIndicator: conditional rendering based on status param
  - ProgressBar: computed geometry (percentage-based fill)
  - DataFlowArrow: dynamic arrows with direction/speed params
  - HexagonCluster: loop-based hexagonal grid generation
  - MetricGauge: radial gauge with arc computation + zones
- Webpack build pipeline (npm run build / build:dev / watch)
- Pre-built dist/drawio-custom-shapes.js ready for installation
- Full README with installation instructions for desktop + web
2026-07-24 15:57:59 +00:00

17 lines
455 B
JavaScript

const path = require('path');
module.exports = (env, argv) => ({
entry: './src/index.js',
output: {
filename: 'drawio-custom-shapes.js',
path: path.resolve(__dirname, 'dist'),
// No library wrapper — draw.io plugins are plain scripts
// that call Draw.loadPlugin() as a side effect
iife: true
},
devtool: argv.mode === 'development' ? 'source-map' : false,
optimization: {
minimize: argv.mode === 'production'
}
});