Socket
Socket
Sign inDemoInstall

highlightjs-macaulay2

Package Overview
Dependencies
1
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    highlightjs-macaulay2

highlight.js syntax definition for Macaulay2


Version published
Weekly downloads
54
increased by5.88%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

highlightjs-macaulay2

npm version github workflow

Macaulay2 is a software system devoted to supporting research in algebraic geometry and commutative algebra.

highlight.js is a JavaScript syntax highlighter with language auto-detection and zero dependencies.

Usage

Include the Highlight.js library in your webpage or Node app, then load this module.

Static website

Load the module after loading Highlight.js. Use the minified version found in the dist directory. This module is just a CDN build of the language, so it will register itself as the JavaScript is loaded.

<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script type="text/javascript" src="/path/to/macaulay2.min.js"></script>
<script type="text/javascript">hljs.highlightAll();</script>

Using directly from the UNPKG CDN

<script type="text/javascript"
  src="https://unpkg.com/highlightjs-macaulay2/dist/macaulay2.min.js"></script>

With Node or another build system

If you're using Node / Webpack / Rollup / Browserify, etc., require the language module, then register it with Highlight.js.

var hljs = require('highlight.js');
var macaulay2 = require('highlightjs-macaulay2');

hljs.registerLanguage("macaulay2", macaulay2);
hljs.highlightAll();

Building and testing

To build dist/macaulay2.min.js yourself, run:

npm run build

Or, if you have already cloned the highlight.js repository:

npm run build -- HLJSDIR=/path/to/highlight.js

To build a minimal version, dist/highlight.js, bundling highlight.js, the Macaulay2 language, and the default highlight.js style (without the background color), run:

npm install
npm run bundle

To update the Macaulay2 language keywords, e.g., after a new release of Macaulay2, run:

npm run update

Note that you must have Macaulay2 installed for this to work. If you have already cloned the Macaulay2 repository:

npm run update -- M2DIR=/path/to/M2

To run the test suite, run:

npm run test

Or, as above, if you already have the highlight.js repository cloned:

npm run test -- HLJSDIR=/path/to/highlight.js

License

Distributed under the BSD 3-Clause License. See LICENSE for more information.

Highlight.js is also released under the BSD 3-Clause License.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork this project.
  2. Create a work branch (git checkout -b my-branch).
  3. Commit your changes (git commit -m 'my changes').
  4. Push the branch (git push origin my-branch).
  5. Open a Pull Request from your fork back to this repository.

Keywords

FAQs

Last updated on 27 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc