JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4065
  • Score
    100M100P100Q116524F
  • License

React.js + prismjs syntax hightlight component

Package Exports

  • react-prism

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-prism) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-prism Travis CI Quality Coverage Dependencies Gitter

React.js + prismjs syntax hightlight component

Version

Demo

Static hosted demo site on GitHub.

Example

Please refer to client folder for example.

Usage

This module requires to be bundled with webpack/browserify and loads react/addons internally. WIP: release a UMD version via bower/components.

Then:

var {PrismCode} = require("react-prism");

  // In a react component:
  render () {
    return (
      <PrismCode className="language-javascript">
        {require("raw-loader!./PrismCode")}
      </PrismCode>
    );
  }

Development

git clone ...
npm i
npm run dev

Then open http://localhost:8080.

Contributing

devDependency Status

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Credits