Skip to content

Commit

Permalink
feat: add shiki code block extension to the editor (#1)
Browse files Browse the repository at this point in the history
* feat: add shiki code block extension to the editor

* feat: modify the background color when selecting a theme

* Add theme-libn

* use an array of objects to display languages and themes

* Refactor dependencies

---------

Co-authored-by: Ryan Wang <[email protected]>
  • Loading branch information
LIlGG and ruibaby authored Nov 22, 2024
1 parent c7ac6f1 commit b06c99d
Show file tree
Hide file tree
Showing 39 changed files with 11,337 additions and 490 deletions.
10 changes: 9 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ ij_formatter_tags_enabled = false
ij_smart_tabs = false
ij_wrap_on_typing = false

[{*.ts, *.js, *.mjs, *.cjs}]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true

[*.java]
max_line_length = 100
ij_continuation_indent_size = 4
Expand Down Expand Up @@ -507,4 +515,4 @@ ij_html_text_wrap = normal
[{*.yaml, *.yml}]
indent_size = 2
ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true
ij_yaml_keep_line_breaks = true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ application-local.yml
application-local.yaml
application-local.properties

/ui/node_modules/
node_modules
/workplace/
/src/main/resources/console/
/src/main/resources/static/
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id "run.halo.plugin.devtools" version "0.0.9"
}

group 'run.halo.starter'
group 'run.halo.shiki'
sourceCompatibility = JavaVersion.VERSION_17

repositories {
Expand All @@ -16,7 +16,7 @@ repositories {
}

dependencies {
implementation platform('run.halo.tools.platform:plugin:2.11.0-SNAPSHOT')
implementation platform('run.halo.tools.platform:plugin:2.17.0-SNAPSHOT')
compileOnly 'run.halo.app:api'

testImplementation 'run.halo.app:api'
Expand All @@ -32,7 +32,7 @@ tasks.withType(JavaCompile).configureEach {
}

node {
nodeProjectDir = file("${project.projectDir}/ui")
nodeProjectDir = file("${project.projectDir}")
}

tasks.register('buildFrontend', PnpmTask) {
Expand All @@ -52,5 +52,5 @@ build {
}

halo {
version = '2.17'
}
version = '2.19'
}
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"scripts": {
"build": "pnpm build:theme-lib && pnpm build:ui",
"build:ui": "pnpm --filter ./ui build",
"build:theme-lib": "pnpm --filter ./theme-lib build"
},
"dependencies": {
"shiki": "^1.16.1"
},
"devDependencies": {
"@rspack/cli": "^1.0.1",
"@rspack/core": "^1.0.1",
"typescript": "~5.5.4",
"prettier": "^3.3.3"
}
}
Loading

0 comments on commit b06c99d

Please sign in to comment.