npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

prismjs-loader

0.0.4 • Public • Published

prismjs-loader for webpack

prismjs-loader for webpack, http://prismjs.com/

Installation

npm install -D prismjs-loader

Usage

Don't forget to provide file type via query, so loader can choose correct component to use. List of components to use: link If component called prism-apacheconf.js you need to provide apacheconf via query.

On ui you need to add ref to stylesheet with prism theme, demo of themes here, list of stylesheets here

Note: don't use this loader in configuration, most probably you don't need it there

Important: use !! in require, to disable all other file loaders from webpack configuration

var fileContent = require('!!prismjs?lang=markdown!./template.html');
// => returns highlighted html content
 
var fileContent = require('!!prismjs?lang=javascript!./index.js');
// => returns highlighted javascript content
 

Contribution and Feature requests

If you need support of plugins welcome to create an issue or pull request, currently plugins are not supported

License

MIT

install

npm i prismjs-loader

Downloadsweekly downloads

123

version

0.0.4

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability