valor-software/prismjs-loader

Name: prismjs-loader

Owner: Valor Software

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

Created: 2015-09-02 09:59:16.0

Updated: 2018-01-04 06:55:52.0

Pushed: 2017-11-14 21:05:29.0

Homepage: null

Size: 7

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

prismjs-loader for webpack

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

Installation

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

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

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.