Skip to content

Commit

Permalink
Upgrade highlight.js to v11.4.0 (#183)
Browse files Browse the repository at this point in the history
* feat: upgrade highlight.js to v11.4.0

* refactor(scripts): use fs.rmSync instead of fs.rmdirSync
  • Loading branch information
metonym authored Jan 6, 2022
1 parent 1325035 commit 3112b24
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 9 deletions.
2 changes: 1 addition & 1 deletion SUPPORTED_LANGUAGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Supported Languages

> 191 languages exported from highlight.js@11.3.1
> 191 languages exported from highlight.js@11.4.0
## 1c (`_1c`)

Expand Down
24 changes: 23 additions & 1 deletion SUPPORTED_STYLES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Supported Styles

> 242 styles exported from highlight.js@11.3.1
> 243 styles exported from highlight.js@11.4.0
## 3024 (`_3024`)

Expand Down Expand Up @@ -2972,6 +2972,28 @@
</script>
```

## intellij-light (`intellijLight`)

**Injected Styles**

```html
<script>
import intellijLight from "svelte-highlight/src/styles/intellijLight";
</script>

<svelte:head>
{@html intellijLight}
</svelte:head>
```

**CSS StyleSheet**

```html
<script>
import "svelte-highlight/src/languages/intellij-light.css";
</script>
```

## ir-black (`irBlack`)

**Injected Styles**
Expand Down
4 changes: 4 additions & 0 deletions demo/lib/styles.json
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@
"name": "idea",
"moduleName": "idea"
},
{
"name": "intellij-light",
"moduleName": "intellijLight"
},
{
"name": "ir-black",
"moduleName": "irBlack"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"format": "prettier --write '.'"
},
"dependencies": {
"highlight.js": "11.3.1"
"highlight.js": "11.4.0"
},
"devDependencies": {
"@sveltejs/adapter-static": "next",
Expand Down
4 changes: 2 additions & 2 deletions scripts/utils/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { promisify } from "util";

export const mkdir = (dir) => {
if (fs.existsSync(dir)) {
fs.rmdirSync(dir, { recursive: true });
fs.rmSync(dir, { recursive: true });
}
fs.mkdirSync(dir);
}
};
export const readFile = promisify(fs.readFile);
export const writeFile = promisify(fs.writeFile);
export const copyFile = promisify(fs.copyFile);
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,10 @@ has@^1.0.3:
dependencies:
function-bind "^1.1.1"

highlight.js@11.3.1:
version "11.3.1"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.3.1.tgz#813078ef3aa519c61700f84fe9047231c5dc3291"
integrity sha512-PUhCRnPjLtiLHZAQ5A/Dt5F8cWZeMyj9KRsACsWT+OD6OP0x6dp5OmT5jdx0JgEyPxPZZIPQpRN2TciUT7occw==
highlight.js@11.4.0:
version "11.4.0"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.4.0.tgz#34ceadd49e1596ee5aba3d99346cdfd4845ee05a"
integrity sha512-nawlpCBCSASs7EdvZOYOYVkJpGmAOKMYZgZtUqSRqodZE0GRVcFKwo1RcpeOemqh9hyttTdd5wDBwHkuSyUfnA==

import-fresh@^3.2.1:
version "3.3.0"
Expand Down

0 comments on commit 3112b24

Please sign in to comment.