Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/highlightjs/highlightjs-rpm-specfile
https://github.com/highlightjs/highlightjs-rpm-specfile
highlight-js rpm rpm-spec syntax-highlighting
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/highlightjs/highlightjs-rpm-specfile
- Owner: highlightjs
- License: bsd-3-clause
- Created: 2019-07-08T08:19:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T10:12:15.000Z (over 1 year ago)
- Last Synced: 2024-04-24T20:26:34.686Z (7 months ago)
- Topics: highlight-js, rpm, rpm-spec, syntax-highlighting
- Language: JavaScript
- Size: 9.77 KB
- Stars: 2
- Watchers: 3
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
`highlight.js` syntax definition for RPM spec files.
For more about highlight.js, see https://highlightjs.org/
For more about RPM, see https://rpm.org/
### Usage
Simply include the `highlight.js` script package in your webpage or node app, load up this module and apply it to `hljs`.
If you're not using a build system and just want to embed this in your webpage:
```html
hljs.registerLanguage('rpm-specfile', window.hljsDefineRpmSpecfile);
hljs.highlightAll();```
If you're using webpack / rollup / browserify / node:
```javascript
var hljs = require('highlightjs');
var hljsDefineRpmSpecfile = require('highlightjs-rpm-specfile');hljsDefineRpmSpecfile(hljs);
hljs.highlightAll();
```### Advanced
This is a pretty simple package, the only thing you might want to do differently is name the language something other than `rpm-specfile`. If you want to do this, simply `import { definer } from 'highlightjs-rpm-specfile';` and use it like: `hljs.registerLanguage('othername', definer);`.