{"id":25149544,"url":"https://github.com/lucsorel/plantuml-file-loader","last_synced_at":"2025-10-23T19:42:46.377Z","repository":{"id":57325566,"uuid":"109294748","full_name":"lucsorel/plantuml-file-loader","owner":"lucsorel","description":"A webpack loader which converts PlantUML source files into image files (for web pages, web-slideshows).","archived":false,"fork":false,"pushed_at":"2018-11-08T23:03:15.000Z","size":95,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-30T17:19:25.186Z","etag":null,"topics":["chart","docker","image","plantuml","webpack-loader"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/plantuml-file-loader","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucsorel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-02T17:02:30.000Z","updated_at":"2024-02-04T11:26:16.000Z","dependencies_parsed_at":"2022-09-09T05:53:39.918Z","dependency_job_id":null,"html_url":"https://github.com/lucsorel/plantuml-file-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lucsorel/plantuml-file-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucsorel%2Fplantuml-file-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucsorel%2Fplantuml-file-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucsorel%2Fplantuml-file-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucsorel%2Fplantuml-file-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucsorel","download_url":"https://codeload.github.com/lucsorel/plantuml-file-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucsorel%2Fplantuml-file-loader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266785469,"owners_count":23983823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chart","docker","image","plantuml","webpack-loader"],"created_at":"2025-02-08T21:29:24.764Z","updated_at":"2025-10-23T19:42:41.351Z","avatar_url":"https://github.com/lucsorel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"http://plantuml.com/\" target=\"_blank\"\u003e\n    \u003cimg width=\"116px\" height=\"112px\" alt=\"PlantUML logo\" src=\"http://s.plantuml.com/logoc.png\" style=\"margin-bottom: 40px\" vspace=\"40px\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/webpack/webpack\" target=\"_blank\"\u003e\n    \u003cimg width=\"130px\" height=\"130px\" alt=\"Webpack logo\"\n      src=\"https://webpack.js.org/assets/icon-square-big.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ch1\u003ePlantUML file loader\u003c/h1\u003e\n\u003c/div\u003e\n\n**Converts PlantUML files into images during the webpack processing.**\n\nThe image conversion is inspired by the\nYury Korolev's [plantuml-loader](https://github.com/yury/plantuml-loader) which uses a dockerized version of [PlantUML](http://plantuml.com/), which includes [GraphViz](http://graphviz.org/) for the image generation. However this loader:\n\n* uses ES6 syntax\n* involves non-blocking methods and abstractions (streams and buffers) to perform the generation\n* produces image files instead of returning the generated file content (that may come later as an option if needed)\n\n# Installation\n\nInstall the `plantuml-file-loader`:\n\n```sh\n# via yarn\nyarn add -D webpack plantuml-file-loader\n\n# via npm\nnpm i -D webpack plantuml-file-loader\n```\n\nIn your `webpack.config.js` file:\n\n```js\nmodule.exports = {\n  // ...\n  module: {\n    rules: [\n      // ...\n      {\n        test: /\\.p?uml$/,\n        use: 'plantuml-file-loader?format=svg\u0026outputPath=img/'\n      },\n      // ...\n    ]\n  },\n  // ...\n}\n```\n\nThe `format` can be any of those supported by PlantUML: see the `-t` formats in the [command-line Help section](http://plantuml.com/command-line).\n\n# Use cases\n\n## Requirements\n\nThe loader spawns a `docker` container to which it delegates the image conversion. Therefore:\n* [Docker must be installed](https://docs.docker.com/engine/installation/) on your computer\n* the `docker` daemon must be started (eg. `sudo service docker start` or equivalent)\n* on Linux environments: the `docker` command must be runnable as a **non-root** user, see [docker post-installation steps](https://docs.docker.com/engine/installation/linux/linux-postinstall/)\n\n## Web-based slideshows\n\nCombine this loader with the [markdown-image-loader](https://github.com/lucsorel/markdown-image-loader/blob/master/README.md#web-based-slideshows) to build slideshows based on `markdown` documents. In your markdown file, simply refer to PlantUML source files and they will be converted into images (in SVG format by default, which can be zoomed-in without aliasing).\n\n* the `my-class-diagram.puml` PlantUML file:\n\n```\n@startuml\nclass Car\n\nDriver - Car : drives \u003e\nCar *- Wheel : have 4 \u003e\nCar -- Person : \u003c owns\n\n@enduml\n```\n\n* your `slideshow.md` markdown document:\n\n```\n# Class-diagram slide\n\nThe class diagram is as follows:\n\n![](img/my-class-diagram.puml)\n```\n\nAnd the diagram will be displayed as a real image in your slideshow:\n\n![](img/my-class-diagram-slide.png)\n\n# Unit tests\n\nUnit tests can be run with the `npm test` command.\n\nDespite these efforts, should you find an issue or spot a vital feature, you are welcome to report bugs and submit code requests!\n\n# Changelog\n* **2.0.0**: updated for webpack 4.x (see modifications done on [the loader's option and context](https://medium.com/webpack/webpack-4-migration-guide-for-plugins-loaders-20a79b927202))\n* 1.0.**3**: screenshot fix\n* 1.0.**2**: added: screenshot of class-diagram slide demo, docker requirements\n* 1.0.**1**: link fix in README.md\n* **1.0.0**: initial version for webpack 3.x\n\n# License\n\nMay be freely distributed under the [MIT license](https://github.com/lucsorel/markdown-image-loader/blob/master/LICENSE).\n\nCopyright (c) 2017-2018 Luc Sorel\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucsorel%2Fplantuml-file-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucsorel%2Fplantuml-file-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucsorel%2Fplantuml-file-loader/lists"}