{"id":13610675,"url":"https://github.com/mAAdhaTTah/babel-plugin-prismjs","last_synced_at":"2025-04-13T01:32:09.871Z","repository":{"id":34317305,"uuid":"134710351","full_name":"mAAdhaTTah/babel-plugin-prismjs","owner":"mAAdhaTTah","description":"A babel plugin to use PrismJS with standard bundlers.","archived":false,"fork":false,"pushed_at":"2023-01-07T03:58:04.000Z","size":359,"stargazers_count":157,"open_issues_count":18,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-27T12:38:57.206Z","etag":null,"topics":["babel","babel-plugin","browserify","prismjs","rollup","syntax-highlighting","webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mAAdhaTTah.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":"2018-05-24T12:11:38.000Z","updated_at":"2024-09-16T10:55:05.000Z","dependencies_parsed_at":"2023-01-15T06:16:50.223Z","dependency_job_id":null,"html_url":"https://github.com/mAAdhaTTah/babel-plugin-prismjs","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mAAdhaTTah%2Fbabel-plugin-prismjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mAAdhaTTah%2Fbabel-plugin-prismjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mAAdhaTTah%2Fbabel-plugin-prismjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mAAdhaTTah%2Fbabel-plugin-prismjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mAAdhaTTah","download_url":"https://codeload.github.com/mAAdhaTTah/babel-plugin-prismjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223558245,"owners_count":17165095,"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","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":["babel","babel-plugin","browserify","prismjs","rollup","syntax-highlighting","webpack"],"created_at":"2024-08-01T19:01:46.966Z","updated_at":"2024-11-07T17:30:20.110Z","avatar_url":"https://github.com/mAAdhaTTah.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# babel-plugin-prismjs [![Build Status](https://travis-ci.org/mAAdhaTTah/babel-plugin-prismjs.svg?branch=master)](https://travis-ci.org/mAAdhaTTah/babel-plugin-prismjs)\n\nA babel plugin to use PrismJS with standard bundlers.\n\n## How to Use\nThis plugin allows you to treat PrismJS as a standard module and configure what languages, plugins, \u0026 themes you want to bundle with Prism.\n\nIn your code, import `prismjs`:\n\n```js\nimport Prism from 'prismjs';\n\n// if you are intending to use Prism functions manually, you will need to set:\nPrism.manual = true;\n\nPrism.highlightAll();\n```\n\nThe exported `Prism` object will be the fully-configured Prism instance.\n\n### Limitations\n\n- You must be using ES6 imports to load PrismJS.\n\n## Configuring the plugin\n\nIn your .babelrc, register the plugin and configure its dependencies:\n\n```json\n{\n  \"plugins\": [\n    [\"prismjs\", {\n        \"languages\": [\"javascript\", \"css\", \"markup\"],\n        \"plugins\": [\"line-numbers\"],\n        \"theme\": \"twilight\",\n        \"css\": true\n    }]\n  ]\n}\n```\n\nEach key are used as follows:\n\n* `languages`: Array of languages to include in the bundle or `\"all\"` to include all languages. Those languages can be found [here](http://prismjs.com/#languages-list).\n* `plugins`: Array of plugins to include in the bundle. Those plugins can be found [here](http://prismjs.com/#plugins).\n* `theme`: Name of theme to include in the bundle. Themes can be found [here](http://prismjs.com/).\n* `css`: Boolean indicating whether to include `.css` files in the result. Defaults to `false`. If `true`, `import`s will be added for `.css` files. Must be `true` in order for `theme` to work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FmAAdhaTTah%2Fbabel-plugin-prismjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FmAAdhaTTah%2Fbabel-plugin-prismjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FmAAdhaTTah%2Fbabel-plugin-prismjs/lists"}