docs/.vuepress/tools/angular-umd-builder/README.md
This tool is responsible for building UMD (Universal Module Definition) bundles of Angular and Handsontable's Angular wrapper for use in the documentation. It creates pre-built, minified UMD bundles that can be loaded directly in the browser.
The documentation site needs to demonstrate Angular integration with Handsontable in a browser environment. However, Angular is typically used with a build system and doesn't provide UMD bundles out of the box. This tool solves this by:
This tool maintains its own package.json and dependencies becuase it has to use a modern Webpack config in order to correctly process the Angular dependencies - Vuepress requires webpack@4 to work, while this builder requires webpack@5.
The tool is typically run as part of the documentation build process. It can be executed manually using:
npm run umd-builder:full-build
This command will:
It can also be run straight from the /docs directory by calling npm run docs:build:angular-umd.
The built UMD bundles are placed in docs/.vuepress/public/scripts/prebuilt-umd/ and include:
After building, the tool automatically cleans up its dependencies to keep the project clean and prevent any potential conflicts with the docs' dependencies.