GithubHelp home page GithubHelp logo

prismjs-loader's Introduction

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

prismjs-loader's People

Contributors

foxandxss avatar marclaval avatar valorkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

prismjs-loader's Issues

Merge with mine?

Hi,

I wrote a prism loader before I noticed you had written one. Maybe you could take some of the best ideas from there and merge them to yours?

The lookup relies on prism-languages. That's package has been generated based on prism to make it easy to consume the definitions through Node. Hopefully this package becomes obsolete at some point. It works quite well for now, though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.