prismjs-loader for webpack, http://prismjs.com/
JavaScript
Latest commit 974b0f8 Sep 26, 2016 @valorkin valorkin 0.0.4
Permalink
Failed to load latest commit information.
.editorconfig
.eslintrc.json
.gitignore
.travis.yml feat(package): updated to es6 standarts May 11, 2016
CHANGELOG.md
LICENSE
README.md
index.js
package.json

README.md

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