@immccn123/prism-autoloader-plus

0.1.3 • Public • Published

prism-autoloader-plus

Add more feature to prism-autoloader.

Build:

pnpm install
pnpm build

Usage:

<script src="prism-autoloader-plus.min.js"></script>
<!-- or use CDN -->
<script src="https://cdn.jsdelivr.net/npm/@immccn123/prism-autoloader-plus@{version}/prism-autoloader-plus.min.js"></script>

See offical document for basic usage.

In addition to the configuration items mentioned in the official documentation, this plugin also provides the following configurations:

<script>
  Prism.plugins.autoloader.languages_path =
    "https://unpkg.com/prismjs@1.29.0/components/"; // trailing slash is required
  // Addtional
  Prism.plugins.autoloader.lang_dependencies = {
    doxycpp: "cpp",
    "language-string": ["multiple", "dependencies"],
  };
  // Addtional
  Prism.plugins.autoloader.lang_urls = {
    doxycpp:
      "//fastly.jsdelivr.net/npm/prism-cpp-doxygen/prism-cpp-doxygen.min.js",
  };
</script>

If you don't need these additional configuration items, please use the official plugin.

Readme

Keywords

Package Sidebar

Install

npm i @immccn123/prism-autoloader-plus

Weekly Downloads

2

Version

0.1.3

License

MIT

Unpacked Size

33.3 kB

Total Files

10

Last publish

Collaborators

  • immccn123