rollup-ts
October 13, 2023 ยท View on GitHub
Example of Typescript application using maxGraph and bundled with Rollup
Created from the rollup-starter-app template, commit 3a67308 Adapted from https://github.com/typed-mxgraph/typed-mxgraph-example-bundled-with-rollup commit dcf8cd3
Getting started
Setup
From the repository root, run npm install. For more details, see the root README.
If you want to use the maxGraph development version (built locally), see the root README about maxGraph integration.
Running the project
The public/index.html file contains a <script src='bundle.js'> tag, which means we need to create public/bundle.js.
The rollup.config.js file tells Rollup how to create this bundle, starting with src/main.ts and including all its dependencies,
including mxGraph.
From the project root
npm run buildbuilds the application todist, along with a sourcemap file for debugging.npm startlaunches a server, using serve. Navigate to http://localhost:3000/.npm run watchwill continually rebuild the application as your source files change.npm run devwill runnpm startandnpm run watchin parallel.