{"id":18890051,"url":"https://github.com/shipshapecode/ember-prism","last_synced_at":"2025-09-01T16:40:47.485Z","repository":{"id":31185349,"uuid":"34745915","full_name":"shipshapecode/ember-prism","owner":"shipshapecode","description":"Easy ember components for syntax highlighting a-la PrismJS","archived":false,"fork":false,"pushed_at":"2024-04-30T10:41:24.000Z","size":4591,"stargazers_count":34,"open_issues_count":9,"forks_count":26,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-01T22:05:44.842Z","etag":null,"topics":["code-highlight","ember","ember-addon","hacktoberfest","prismjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/shipshapecode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-28T17:40:29.000Z","updated_at":"2024-05-07T11:26:24.532Z","dependencies_parsed_at":"2023-12-25T11:25:39.748Z","dependency_job_id":"817aeca6-90a3-473d-83ac-8fe95233ec3b","html_url":"https://github.com/shipshapecode/ember-prism","commit_stats":{"total_commits":616,"total_committers":26,"mean_commits":"23.692307692307693","dds":"0.46266233766233766","last_synced_commit":"108c66a0817ce64f33ee299a445df5701059d2fa"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/shipshapecode/ember-prism","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipshapecode%2Fember-prism","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipshapecode%2Fember-prism/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipshapecode%2Fember-prism/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipshapecode%2Fember-prism/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shipshapecode","download_url":"https://codeload.github.com/shipshapecode/ember-prism/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipshapecode%2Fember-prism/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268308970,"owners_count":24230163,"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-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["code-highlight","ember","ember-addon","hacktoberfest","prismjs"],"created_at":"2024-11-08T07:52:12.374Z","updated_at":"2025-08-01T22:42:38.700Z","avatar_url":"https://github.com/shipshapecode.png","language":"TypeScript","readme":"# ember-prism\n\n\u003ca href=\"https://shipshape.io/\"\u003e\u003cimg src=\"http://i.imgur.com/DWHQjA5.png\" alt=\"Ship Shape\" width=\"100\" height=\"100\"/\u003e\u003c/a\u003e\n\n**[ember-prism is built and maintained by Ship Shape. Contact us for Ember.js consulting, development, and training for your project](https://shipshape.io/ember-consulting/)**.\n\n[![npm version](https://badge.fury.io/js/ember-prism.svg)](http://badge.fury.io/js/ember-prism)\n[![npm](https://img.shields.io/npm/dm/ember-prism.svg)]()\n[![Ember Observer Score](https://emberobserver.com/badges/ember-prism.svg)](https://emberobserver.com/addons/ember-prism)\n[![Build Status](https://travis-ci.org/shipshapecode/ember-prism.svg?branch=master)](https://travis-ci.org/shipshapecode/ember-prism)\n\nThis project aims to make re-usable ember components for [PrismJS](http://prismjs.com/).\nThis project is packaged as an [EmberCLI](http://www.ember-cli.com) addon.\n\n## Compatibility\n\n* Ember.js v4.8 or above\n* Ember CLI v4.8 or above\n* Node.js v18 or above\n\nFor Ember \u003c= 3.12 use version 0.7.0 of ember-prism.\n\n## Installation\n\nInstall the ember-cli addon in your ember-cli project:\n\n```shell\nember install ember-prism\n```\n\n## Usage\n\n### Using components\n\nWe have two main components, `code-block`, and `code-inline`. They'll take care of running Prism on your code as you transition.\n\nThey accept the code to be rendered by passing a `@code` argument:\n\n```hbs\n\u003cCodeBlock @code=\"\u003ca href='link'\u003evalue\u003c/a\u003e\" @language=\"markup\" /\u003e\n```\n\nWhile both variants support all features, the former is preferable when the code content is subject to changes (re-rendering).\nFor the latter you may need to use `\u0026lt;`, and `\u0026gt;` html attributes to escape `\u003c`, and `\u003e` characters so they aren't removed by Handlebars.\n\nThe `@language` argument is optional, and if passed should match one of Prism's [supported languages](https://prismjs.com/#supported-languages).\n\n#### Overriding Line Numbers\n\nIf you have opted to use the `line-numbers` plugin within your `ember-cli-build.js`, then you can optionally pass in `@start` to `\u003cCodeBlock/\u003e` to set a custom starting line.  This is particularly useful when showing \"contiguous\" *hunks* of code (while not showing the *entire* code file).\n\n(within `ember-cli-build.js`):\n```js\nmodule.exports = function (defaults) {\n  let app = new EmberAddon(defaults, {\n    // other options\n    'ember-prism': {\n      plugins: ['line-numbers']\n    },\n  });\n};\n```\n\n(in your component that renders a `\u003cCodeBlock /\u003e`)\n```hbs\n\u003cCodeBlock @code=\"\u003chtml lang='en'\u003e\" @start={{2}} /\u003e\n```\n\nThis will result in the code block starting its line numbering from `2`, instead of `1`.\n\n### Configuration\n\nYou can set which theme, components, and plugins you'd like to use from Prism.\n\n```js\n// ember-cli-build.js\nvar app = new EmberApp({\n  'ember-prism': {\n    'theme': 'twilight',\n    'components': ['scss', 'javascript'], //needs to be an array, or undefined.\n    'plugins': ['line-highlight']\n  }\n})\n```\n\nIf you want to use the default theme, just remove the `theme` option completely.\n\nIf you want hi-fi Glimmer / Ember highlighting, specify:\n```js\ncomponents: ['markup'],\n```\nand somewhere in your app:\n```js\nimport { setup } from 'ember-prism';\n\nsetup();\n```\n\n## Running Locally\n\n* Run `ember server`\n* Visit your app at http://localhost:4200.\n\n### Running tests\n\n* `ember test` – Runs the test suite on the current Ember version\n* `ember test --server` – Runs the test suite in \"watch mode\"\n* `ember try:each` – Runs the test suite against multiple Ember versions\n\n### Running the dummy application\n\n* `ember serve`\n* Visit the dummy application at [http://localhost:4200](http://localhost:4200).\n\n## Contributing\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipshapecode%2Fember-prism","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshipshapecode%2Fember-prism","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipshapecode%2Fember-prism/lists"}