Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💥 pnpm -> deno #99

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
- uses: denoland/setup-deno@v2
with:
node-version-file: ".node-version"
cache: "pnpm"
- run: pnpm install
- run: pnpm build
deno-version: v2.x
- run: deno install
- run: deno task build

biome:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
- uses: denoland/setup-deno@v2
with:
node-version-file: ".node-version"
cache: "pnpm"
- run: pnpm install
- run: pnpm biome check .
deno-version: v2.x
- run: deno check .
- run: deno fmt --check .
- run: deno lint .
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ jobs:

steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
- uses: denoland/setup-deno@v2
with:
node-version-file: ".node-version"
cache: "pnpm"
- run: pnpm install
- run: pnpm build
deno-version: v2.x
- run: deno install
- run: deno task build
- run: |
tag="${GITHUB_REF#refs/tags/}"
gh release create "$tag" \
Expand Down
File renamed without changes.
18 changes: 2 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# Intellij
*.iml
.idea

# npm
node_modules
.DS_Store

# Don't include the compiled main.js file in the repo.
# They should be uploaded to GitHub releases instead.
main.js

# Exclude sourcemaps
*.map

# obsidian
data.json

# Exclude macOS Finder (System Explorer) View States
.DS_Store
main.js
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["biomejs.biome"]
"recommendations": ["denoland.vscode-deno"]
}
29 changes: 21 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
{
"[javascript][typescript][json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"biome.enabled": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
"[css]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[json]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[jsonc]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[markdown]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[yaml]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"deno.enable": true,
"deno.lint": true,
"editor.defaultFormatter": "denoland.vscode-deno"
}
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
# Graph Banner

[![release](https://img.shields.io/github/manifest-json/v/ras0q/obsidian-graph-banner.svg?color=A68AF9&style=for-the-badge&logo=github)](https://github.com/ras0q/obsidian-graph-banner/releases/latest) [![downloads](https://img.shields.io/badge/dynamic/json?url=https://raw.githubusercontent.com/obsidianmd/obsidian-releases/master/community-plugin-stats.json&query=$['graph-banner'].downloads&label=Downloads&color=A68AF9&style=for-the-badge&logo=obsidian&
)](https://obsidian.md/plugins?id=graph-banner)
[![release](https://img.shields.io/github/manifest-json/v/ras0q/obsidian-graph-banner.svg?color=A68AF9&style=for-the-badge&logo=github)](https://github.com/ras0q/obsidian-graph-banner/releases/latest)
[![downloads](https://img.shields.io/badge/dynamic/json?url=https://raw.githubusercontent.com/obsidianmd/obsidian-releases/master/community-plugin-stats.json&query=$['graph-banner'].downloads&label=Downloads&color=A68AF9&style=for-the-badge&logo=obsidian&)](https://obsidian.md/plugins?id=graph-banner)

An [Obsidian](https://obsidian.md/) plugin to display a local graph view to the note header.
An [Obsidian](https://obsidian.md/) plugin to display a local graph view to the
note header.

![screenshot thumbnail](./thumbnail.png)

This screenshot was generated using [s-blu/obsidian_dataview_example_vault](https://github.com/s-blu/obsidian_dataview_example_vault)
This screenshot was generated using
[s-blu/obsidian_dataview_example_vault](https://github.com/s-blu/obsidian_dataview_example_vault)

## Usage

1. **[Install](https://obsidian.md/plugins?id=graph-banner)** and **enable** the plugin.
1. **[Install](https://obsidian.md/plugins?id=graph-banner)** and **enable** the
plugin.
2. **Just open a note** and the graph will be displayed in the header!

> [!TIP]
>
> - You can customize the banner appearance via [Style Settings](https://github.com/mgmeyers/obsidian-style-setting) plugin.
> - You can save the local graph settings via [Sync Graph Settings](https://github.com/Xallt/sync-graph-settings) plugin.
> - **Graph settings synchronizatoin is only reflected the first time you open a note**, so reload the app if you change those settings.
> - You can customize the banner appearance via
> [Style Settings](https://github.com/mgmeyers/obsidian-style-setting) plugin.
> - You can save the local graph settings via
> [Sync Graph Settings](https://github.com/Xallt/sync-graph-settings) plugin.
> - **Graph settings synchronizatoin is only reflected the first time you open
> a note**, so reload the app if you change those settings.
21 changes: 0 additions & 21 deletions biome.json

This file was deleted.

25 changes: 25 additions & 0 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"compilerOptions": {
"lib": [
"deno.window",
"dom"
]
},
"exclude": [
"node_modules",
"main.js"
],
"fmt": {
"useTabs": true
},
"imports": {
"esbuild": "npm:[email protected]",
"ignore": "npm:[email protected]",
"obsidian": "npm:[email protected]"
},
"nodeModulesDir": "auto",
"tasks": {
"build": "esbuild ./src/main.ts --bundle --external:obsidian --format=cjs --minify --target=es6 --outfile=./main.js",
"dev": "esbuild ./src/main.ts --watch --bundle --external:obsidian --format=cjs --target=es6 --sourcemap=inline --outfile=./main.js"
}
}
165 changes: 165 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 0 additions & 29 deletions package.json

This file was deleted.

Loading