An open API service indexing awesome lists of open source software.

https://github.com/samuelmarks/angular-prism-dist

Angular bindings for Prism.js
https://github.com/samuelmarks/angular-prism-dist

Last synced: 3 months ago
JSON representation

Angular bindings for Prism.js

Awesome Lists containing this project

README

          

angular-prism
=============

Angular bindings for [Prism.js](http://prismjs.com).

Tested with Angular 5+.

## Quick start

npm i --save https://api.github.com/repos/SamuelMarks/angular-prism-dist/tarball

Then add it to the `import:` of your module:

import { CodeblockModule } from 'angular-prism';

Finally use it in that package like so:


foooooooo

Often you'll need to escape characters, but it's still usable:

```

#include {{ '<' }}cstdio>

int main(void) {{ '{' }}
puts("Hello World!");
{{ '}' }}

```

## Development
Install Node.js and `@angular/cli`, then just use the regular `ng` commands. Also if you want to package it up, use:

npm run build-pkg

## Open question

How do I allow the uses of my package to specify which plugins they want from Prism?

Or do I include them all and the minifiers within webpack will minify what you don't use?