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
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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'
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user