Skip to content

Commit 25602f0

Browse files
committed
vuepress: upgrade to 2.0.0-rc.20
1 parent d315473 commit 25602f0

File tree

3 files changed

+2129
-1173
lines changed

3 files changed

+2129
-1173
lines changed

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
},
1717
"homepage": "https://gbdev.io",
1818
"devDependencies": {
19-
"vuepress": "^2.0.0-beta.66",
20-
"vuepress-plugin-shiki": "^0.14.1",
21-
"vite-raw-plugin": "^1.0.2",
22-
"vue-inline-svg": "^2.1.3"
19+
"@vuepress/bundler-vite": "^2.0.0-rc.20",
20+
"@vuepress/plugin-shiki": "^2.0.0-rc.91",
21+
"@vuepress/theme-default": "^2.0.0-rc.91",
22+
"sass-embedded": "^1.86.1",
23+
"vue-inline-svg": "^4.0.0",
24+
"vuepress": "^2.0.0-rc.20"
2325
}
2426
}

website/.vuepress/config.js

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
// .vuepress/config.js
22

3-
//const { path } = require("@vuepress/utils");
4-
5-
import markdownRawPlugin from "vite-raw-plugin";
6-
import { defaultTheme } from "vuepress";
7-
import { viteBundler } from "vuepress";
8-
import shiki from "vuepress-plugin-shiki";
3+
import { defaultTheme } from "@vuepress/theme-default";
4+
import { viteBundler } from "@vuepress/bundler-vite";
5+
import { shikiPlugin } from "@vuepress/plugin-shiki";
96

107
module.exports = {
11-
plugins: [shiki({ langs: ["asm"] })],
8+
plugins: [shikiPlugin({ langs: ["asm"] })],
129
title: "gbdev.io",
1310
description: "game boy development scene",
1411
head: [
15-
['script', {}, `
12+
[
13+
"script",
14+
{},
15+
`
1616
var _paq = window._paq = window._paq || [];
1717
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
1818
_paq.push(['trackPageView']);
@@ -24,7 +24,8 @@ module.exports = {
2424
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
2525
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
2626
})();
27-
`],
27+
`,
28+
],
2829
[
2930
"link",
3031
{
@@ -115,11 +116,11 @@ module.exports = {
115116
},
116117
{
117118
link: "https://evie.gbdev.io/blog/interrupts.html",
118-
text: "Interrupts tutorial"
119+
text: "Interrupts tutorial",
119120
},
120121
{
121122
link: "https://evie.gbdev.io/blog/understanding-structures.html",
122-
text: "Understanding Structures"
123+
text: "Understanding Structures",
123124
},
124125
{ link: "/guides/deadcscroll", text: "Dead C Scroll" },
125126
{
@@ -136,7 +137,17 @@ module.exports = {
136137

137138
bundler: viteBundler({
138139
viteOptions: {
139-
plugins: [markdownRawPlugin({ fileRegex: /\.asm$/ })],
140+
plugins: [
141+
{
142+
name: "raw-asm-loader",
143+
enforce: "pre",
144+
transform(code, id) {
145+
if (id.endsWith(".asm")) {
146+
return `export default ${JSON.stringify(code)};`;
147+
}
148+
},
149+
},
150+
],
140151
resolve: {
141152
alias: {
142153
"@": __dirname, // Alias to the `.vuepress` folder

0 commit comments

Comments
 (0)