New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

highlightjs-cshtml-razor

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

highlightjs-cshtml-razor - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

.github/workflows/node.js.yml

3

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file.
## [2.1.0] - 2021-04-14
- Add the dist directory, and a minified version of the script
## [2.0.1] - 2021-03-02

@@ -5,0 +8,0 @@ ### Fixed

17

package.json
{
"name": "highlightjs-cshtml-razor",
"version": "2.0.1",
"version": "2.1.0",
"description": "highlight.js syntax definition for ASP.NET Razor CSHTML language",
"main": "cshtml-razor.js",
"main": "src/languages/cshtml-razor.js",
"scripts": {

@@ -13,8 +13,6 @@ "test": "./node_modules/.bin/mocha --reporter spec"

},
"files": [
"cshtml-razor.js"
],
"keywords": [
"cshtml",
"cshtml-razor",
"cshtml-blazor",
"razor-cshtml",

@@ -28,3 +26,4 @@ "razor",

"c#",
"csharp"
"csharp",
"blazor"
],

@@ -38,7 +37,9 @@ "author": "RomanResh",

"devDependencies": {
"highlight.js": "^10.0.0",
"highlight.js": "^10.7.2",
"mocha": "^5.2.0",
"should": "^13.2.3"
},
"dependencies": {}
"dependencies": {
"minimist": "^1.2.5"
}
}

@@ -1,18 +0,20 @@

`highlight.js` syntax definition for Razor CSHTML.
# CSHTML Razor - a language grammar for [highlight.js](https://highlightjs.org/)
For more about highlight.js, see https://highlightjs.org/
![version](https://badgen.net/npm/v/highlightjs-cshtml-razor) ![license](https://badgen.net/badge/license/CC0%201.0/blue)
![install size](https://badgen.net/packagephobia/install/highlightjs-cshtml-razor) ![minified size](https://badgen.net/bundlephobia/min/highlightjs-cshtml-razor)
CSHTML is a markup language created by Microsoft for ASP.NET MVC and ASP.NET Core applications. It allows to create markup containing both C# and HTML code.
CSHTML is a markup language created by Microsoft for ASP.NET MVC, ASP.NET Core and Blazor applications. It allows to create markup containing both C# and HTML code.
For more about the CSHTML Razor syntax here: https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor.
### Usage
## Usage
Simply include the `highlight.js` script package in your webpage or node app, load up this module and apply it to `hljs`.
Simply include the `Highlight.js` library in your webpage or Node app, then load this module.
If you're not using a build system and just want to embed this in your webpage:
### Static website or simple usage
Simply load the module after loading Highlight.js. You'll 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.
```html
<script src="/path/to/highlight.js/highlight.pack.js"></script>
<script src="/path/to/highlightjs-cshtml-razor/cshtml-razor.js"></script>
<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script type="text/javascript" src="/path/to/highlightjs-cshtml-razor/dist/cshtml-razor.min.js"></script>
<script>

@@ -24,9 +26,19 @@ hljs.registerLanguage('cshtml-razor', window.hljsDefineCshtmlRazor);

If you're using webpack / rollup / browserify / node:
### Using directly from the UNPKG CDN
Add the following script tag in your page:
```html
<script type="text/javascript" src="https://unpkg.com/highlightjs-cshtml-razor/dist/cshtml-razor.min.js"></script>
```
### With Node or another build system
If you're using Node / Webpack / Rollup / Browserify, etc, simply require the language module, then register it with Highlight.js.
```javascript
var hljs = require('highlight.js');
var hljsDefineCshtmlRazor = require('highlightjs-cshtml-razor');
var hljs = require('highlightjs');
var hljsRazor = require('highlightjs-cshtml-razor');
hljsDefineCshtmlRazor(hljs);
hljs.registerLanguage("highlightjs-cshtml-razor", hljsRazor);
hljs.initHighlightingOnLoad();

@@ -33,0 +45,0 @@ ```

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc