1.1.0 • Published 6 months ago

highlight-blade v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Highlight Blade

Highlight Laravel Blade & Alpine.js syntax with highlight.js.

You can see the highlight results here.

Installation

Using npm to download the library.

npm install highlight.js hightlight-blade

Importing the Library

To use the Blade template definition with highlight.js, you have two options for importing:

Optimized Import (Recommended)

Load only the language definitions you need.

// import core hljs api and required languages
import hljs from 'highlight.js/lib/core';
import javascript from 'highlight.js/lib/languages/javascript';
import xml from 'highlight.js/lib/languages/xml';
import php from 'highlight.js/lib/languages/php';
import blade from 'highlight-blade';

// register each language definition
hljs.registerLanguage('javascript', javascript);
hljs.registerLanguage('xml', xml);
hljs.registerLanguage('php', php);
hljs.registerLanguage('blade', blade);

Full Import

Load all languages of highlight.js, please note that this generates a large file.

import hljs from 'highlight.js';
import blade from 'highlight-blade';

hljs.registerLanguage('blade', blade);

More information about importing highlight.js library, please refer to here.

TODO

  • Support Laravel Blade syntax
  • Support Alpine.js syntax
1.1.0

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago

1.0.10

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago